Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@aws-cdk/aws-codecommit
Advanced tools
To add a CodeCommit Repository to your stack:
import codecommit = require('@aws-cdk/aws-codecommit');
const repository = new codecommit.Repository(this, 'Repository' ,{
repositoryName: 'MyRepositoryName'
});
To add an SNS trigger to your repository:
import codecommit = require('@aws-cdk/aws-codecommit');
const repository = new codecommit.Repository(this, 'Repository', {
repositoryName: 'MyRepositoryName'
});
// trigger is established for all repository actions on all branches by default.
repository.notify('arn:aws:sns:*:123456789012:my_topic');
To use a CodeCommit Repository in a CodePipeline:
import codecommit = require('@aws-cdk/aws-codecommit');
import codepipeline = require('@aws-cdk/aws-codepipeline');
// see above for the details...
const repository = new codecommit.Repository( // ...
);
const pipeline = new codepipeline.Pipeline(this, 'MyPipeline', {
pipelineName: 'MyPipeline',
});
const sourceStage = new codepipeline.Stage(this, 'Source', {
pipeline,
});
const sourceAction = new codecommit.PipelineSourceAction(this, 'CodeCommit', {
stage: sourceStage,
artifactName: 'SourceOutput', // name can be arbitrary
repository,
});
// use sourceAction.artifact as the inputArtifact to later Actions...
You can also add the Repository to the Pipeline directly:
// equivalent to the code above:
const sourceAction = repository.addToPipeline(sourceStage, 'CodeCommit', {
artifactName: 'SourceOutput',
});
CodeCommit repositories emit CloudWatch events for certain activity.
Use the repo.onXxx
methods to define rules that trigger on these events
and invoke targets as a result:
// starts a CodeBuild project when a commit is pushed to the "master" branch of the repo
repo.onCommit('CommitToMaster', project, 'master');
// publishes a message to an SNS topic when a comment is made on a pull request
const rule = repo.onCommentOnPullRequest('CommentOnPullRequest');
rule.addTarget(myTopic);
0.11.0 (2018-10-11)
IMPORTANT NOTE: This release includes a breaking change in the toolkit <=> app protocol. This means that in order to synthesize CDK apps that use this version, the globally installed CDK toolkit must also be updated:
$ npm i -g aws-cdk
$ cdk --version
0.11.0 (build ...)
Like always, you will also need to update your project's library versions:
Language | Update?
--------------------------- | ------------------------------------------------------------------------------------------------------------------
JavaScript/TypeScript (npm) | npx npm-check-updates -u
Java (maven) | mvn versions:use-latest-versions
.NET (NuGet) | nuget update
framework: The cdk.App
constructor doesn't accept any arguments, and app.run()
does not return a string
anymore. All AWS CDK apps in all languages would need to be modified to adhere to the new API of the cdk.App
construct.
Instead of:
const app = new App(process.argv); // ERROR
// add stacks
process.stdout.write(app.run()); // ERROR
The new usage is:
const app = new App();
// add stacks
app.run();
framework: The CDK is no longer shipped with built-in support for JSX. You can still use JSX but you will have to manually configure it.
aws-iam: PolicyDocument
, PolicyStatement
and all PolicyPrincipal
classes moved from the @aws-cdk/cdk module and into the @aws-cdk/aws-iam module.
aws-codepipeline-api: Artifact.subartifact
method of the CodePipeline API was renamed to Artifact.atPath
.
constructor signature of TagManager
has changed. initialTags
is now passed inside a props object.
util: @aws-cdk/util is no longer available
aws-elasticloadbalancingv2: Adds classes for modeling Application and Network Load Balancers. AutoScalingGroups now implement the interface that makes constructs a load balancing target. The breaking change is that Security Group rule identifiers have been changed in order to make adding rules more reliable. No code changes are necessary but existing deployments may experience unexpected changes.
aws-cloudformation: this renames all CloudFormation Actions for CodePipeline to bring them in line with Actions defined in other service packages.
aws-codepipeline, aws-codecommit, aws-s3: change the names of the source Actions from XxxSource to XxxSourceAction. This is to align them with the other Actions, like Build. Also, CodeBuild has the concept of Sources, so it makes sense to strongly differentiate between the two.
FAQs
The CDK Construct Library for AWS::CodeCommit
The npm package @aws-cdk/aws-codecommit receives a total of 36,013 weekly downloads. As such, @aws-cdk/aws-codecommit popularity was classified as popular.
We found that @aws-cdk/aws-codecommit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.