
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
@wanews/pulumi-wait-for-ecs-deploy
Advanced tools
Provides a pulumi resource which waits for an ECS deployment to complete. Once the deployment completes, it checks whether the deployment was successful.
Provides a pulumi resource which waits for an ECS deployment to complete. Once the deployment completes, it checks whether the deployment was successful.
If a deployment error is detected, a pulumi error is raised.
This module requires an ECS service with circuit breaker enabled.
import * as aws from '@pulumi/aws'
import { WaitForEcsDeployment } from '@wanews/pulumi-wait-for-ecs-deploy'
const cluster = new aws.ecs.Cluster('cluster', {
//...
})
const taskDef = new aws.ecs.TaskDefinition('taskDef', {
//...
})
const service = new aws.ecs.Service('service', {
cluster: cluster.arn,
taskDefinition: taskDef.arn,
deploymentController: {
type: 'ECS',
},
deploymentCircuitBreaker: {
enable: true,
rollback: true,
},
})
const deployment = new WaitForEcsDeployment('wait-for-deployment', {
clusterName: cluster.name,
serviceName: service.name,
desiredTaskDef: taskDef.arn,
awsRegion: 'ap-southeast-2', // optional
assumeRole: 'arn:aws:iam::12345678:role/myRole', // optional
})
pulumi.all([d.status, d.failureMessage]).apply(([status, failureMessage]) => {
console.log(`deployment completed with status ${status}: ${failureMessage}`)
})
The WaitForEcsDeployment resource will wait for the ECS deployment to complete, and then return status to COMPLETE or FAILED.
By default, it will fail after three minutes and treat the deployment as failed.
CMD /bin/false). However, since they never become healthy, the deployment never succeeds. This module includes a timeout (default: 3 minutes); once the timeout is reached, a deployment is treated as failed.Run yarn nx test wait-for-ecs-deploy to execute the unit tests via Jest.
These tests use
Each ECS service has two deployments:
ACTIVE: if a deployment is in progress, this is the deploymentPRIMARY: this is the deployment currently receiving trafficWhen ecs.CreateService or ecs.UpdateService is called:
PRIMARY deployment is replaced by a new task in the ACTIVE deploymentPRIMARY is torn downACTIVE deployment becomes the new PRIMARY deployment.If a new task does not become healthy at step 3, then it is deleted and recreated. By default, this happends undefinitely until a replacement task becomes healthy. However, if circuit breaker is enabled, then when too many tasks fail to become healthy, then the ACTIVE deployment is stopped. If rollback is enabled, the last healthy deployment is re-deployed.
This module uses ecs.DescribeServices to detect errors that occur during a deployment.
A successful deployment is where all deployments are COMPLETED:
{
"services": [
{
"deployments": [
{
"status": "PRIMARY",
"taskDefinition": "arn:aws:ecs:ap-southeast-2:291971919224:task-definition/news-thewest-pr713-web-app-task-definition:3",
"rolloutState": "COMPLETED",
"rolloutStateReason": "ECS deployment ecs-svc/6405940160831029548 completed."
}
]
}
]
}
A failed deployment has rolloutState: FAILED:
{
"services": [
{
"deployments": [
{
"status": "ACTIVE",
"taskDefinition": "arn:aws:ecs:ap-southeast-2:291971919224:task-definition/news-thewest-pr713-web-app-task-definition:3",
"rolloutState": "FAILED",
"rolloutStateReason": "ECS deployment circuit breaker: tasks failed to start."
}
]
}
]
}
If rollbacks are enabled, it will also show the task is being rolled back:
{
"services": [
{
"deployments": [
{
"status": "PRIMARY",
"taskDefinition": "arn:aws:ecs:ap-southeast-2:291971919224:task-definition/news-thewest-pr713-web-app-task-definition:2",
"rolloutState": "IN_PROGRESS",
"rolloutStateReason": "ECS deployment circuit breaker: rolling back to deploymentId ecs-svc/6405940160831029548."
},
{
"status": "ACTIVE",
"taskDefinition": "arn:aws:ecs:ap-southeast-2:291971919224:task-definition/news-thewest-pr713-web-app-task-definition:3",
"rolloutState": "IN_PROGRESS",
"rolloutStateReason": "ECS deployment ecs-svc/1281894607538416024 in progress."
}
]
}
]
}
Once the rollback is complete, it will show that the previous version is once again the PRIMARY deployment:
{
"services": [
{
"deployments": [
{
"status": "PRIMARY",
"taskDefinition": "arn:aws:ecs:ap-southeast-2:291971919224:task-definition/news-thewest-pr713-web-app-task-definition:2",
"rolloutState": "COMPLETED",
"rolloutStateReason": "ECS deployment ecs-svc/6405940160831029548 completed."
}
]
}
]
}
However, the rollback can be detected by examining the taskDefinition in the deployment; in this case, revision 3 was deployed, but the last successful deployment is revision 2.
FAQs
Provides a pulumi resource which waits for an ECS deployment to complete. Once the deployment completes, it checks whether the deployment was successful.
We found that @wanews/pulumi-wait-for-ecs-deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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 found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.