
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@aws-cdk/aws-codepipeline
Advanced tools
This is a developer preview (public beta) module. Releases might lack important features and might have future breaking changes.
To construct an empty Pipeline:
import codepipeline = require('@aws-cdk/aws-codepipeline');
const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline');
To give the Pipeline a nice, human-readable name:
const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline', {
pipelineName: 'MyPipeline',
});
You can provide Stages when creating the Pipeline:
const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline', {
stages: [
{
stageName: 'Source',
actions: [
// see below...
],
},
],
});
Or append a Stage to an existing Pipeline:
const sourceStage = pipeline.addStage({
stageName: 'Source',
actions: [ // optional property
// see below...
],
});
You can insert the new Stage at an arbitrary point in the Pipeline:
const someStage = pipeline.addStage({
stageName: 'SomeStage',
placement: {
// note: you can only specify one of the below properties
rightBefore: anotherStage,
justAfter: anotherStage,
atIndex: 3, // indexing starts at 0
// pipeline.stageCount returns the number of Stages currently in the Pipeline
}
});
Actions live in a separate package, @aws-cdk/aws-codepipeline-actions
.
To add an Action to a Stage, you can provide it when creating the Stage,
in the actions
property,
or you can use the IStage.addAction()
method to mutate an existing Stage:
sourceStage.addAction(someAction);
You can also use the cross-region feature to deploy resources (currently, only CloudFormation Stacks are supported) into a different region than your Pipeline is in.
It works like this:
const pipeline = new codepipeline.Pipeline(this, 'MyFirstPipeline', {
// ...
crossRegionReplicationBuckets: {
// note that a physical name of the replication Bucket must be known at synthesis time
'us-west-1': s3.Bucket.fromBucketName(this, 'UsWest1ReplicationBucket',
'my-us-west-1-replication-bucket'),
},
});
// later in the code...
new codepipeline_actions.CloudFormationCreateUpdateStackAction({
actionName: 'CFN_US_West_1',
// ...
region: 'us-west-1',
});
This way, the CFN_US_West_1
Action will operate in the us-west-1
region,
regardless of which region your Pipeline is in.
If you don't provide a bucket for a region (other than the Pipeline's region)
that you're using for an Action,
there will be a new Stack, called <nameOfYourPipelineStack>-support-<region>
,
defined for you, containing a replication Bucket.
This new Stack will depend on your Pipeline Stack,
so deploying the Pipeline Stack will deploy the support Stack(s) first.
Example:
$ cdk ls
MyMainStack
MyMainStack-support-us-west-1
$ cdk deploy MyMainStack
# output of cdk deploy here...
See the AWS docs here for more information on cross-region CodePipelines.
A pipeline can be used as a target for a CloudWatch event rule:
// kick off the pipeline every day
const rule = new EventRule(this, 'Daily', { scheduleExpression: 'rate(1 day)' });
rule.addTarget(pipeline);
When a pipeline is used as an event target, the "codepipeline:StartPipelineExecution" permission is granted to the AWS CloudWatch Events service.
Pipelines emit CloudWatch events. To define event rules for events emitted by
the pipeline, stages or action, use the onXxx
methods on the respective
construct:
myPipeline.onStateChange('MyPipelineStateChage', target);
myStage.onStateChange('MyStageStateChange', target);
myAction.onStateChange('MyActioStateChange', target);
0.37.0 (2019-07-04)
construct.findChild()
now only looks up direct childrenPort.toRuleJSON
was renamed to toRuleJson
PipelineProject.addSecondaryArtifact
now returns void (formerly any)Project.addSecondaryArtifact
now returns void (formerly any)FAQs
Better interface to AWS Code Pipeline
The npm package @aws-cdk/aws-codepipeline receives a total of 31,007 weekly downloads. As such, @aws-cdk/aws-codepipeline popularity was classified as popular.
We found that @aws-cdk/aws-codepipeline 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.