
AWS Well-Architected: Software Supply Chain Security
AWS Security Blog post translating lessons from the Shai-Hulud, Chalk/Debug, tea.xyz, and axios npm supply chain attacks into concrete AWS Well-Architected Security Pillar recommendations for package consumers. It covers eliminating long-lived credentials (aws login, IAM Identity Center, OIDC), defense-in-depth artifact signing with AWS Signer and ECR managed signing, centralizing dependencies via AWS CodeArtifact package groups to block typosquatting, npm provenance attestations via Sigstore, and Amazon Inspector's behavioral detection of zero-day/sleeper malicious packages feeding into the OpenSSF Malicious Packages Repository (MAL-IDs).
What it is
An AWS Security Blog post mapping package-consumer defenses against recent npm supply chain attacks (Shai-Hulud, Chalk/Debug, tea.xyz token abuse, axios) to specific Well-Architected Security Pillar best practices. Beyond the general advice in the summary, it names the exact best-practice IDs and adds detection and incident-response steps.
How it works
Shai-Hulud spread because it executed in developer environments and CI/CD pipelines and scanned for secrets — npm tokens, GitHub tokens, and AWS IAM access keys — then used any long-lived credentials it found to propagate and reach cloud resources. The maintainer side was compromised via phishing. The consumer-side fix is to remove long-lived credentials so a scan finds nothing durable.
What to do
Concrete controls the post ties to named best practices:
- Use temporary credentials —
aws loginfor local dev, IAM Identity Center, or OIDC federation for GitHub Actions/GitLab CI. → SEC02-BP02 - Grant least privilege, using temporary elevated permissions where higher privilege is occasionally needed. → SEC03-BP02
- Audit and rotate any long-term credentials that remain required. → SEC02-BP05
- For third-party services that don't support temporary credentials, store them in AWS Secrets Manager with restricted access, automatic rotation, and audit logging.
- Incident response: immediately rotate all long-term credentials, and use Amazon GuardDuty and AWS CloudTrail to detect abnormal IAM activity and identify which credentials were compromised.
The defense-in-depth section adds a non-obvious point the summary flattens: requiring multiple approvers on merge requests is not sufficient, because a developer with compromised credentials can still trigger the deployment pipeline. Multi-party approval must be enforced within the pipeline itself for sensitive production releases. For single-maintainer open source projects, MFA is called out as especially critical since there is no separation of duties.
flowchart TD
A[Maintainer creds phished] --> B[Malicious package published]
B --> C[Consumer installs, code runs in dev/CI]
C --> D{Long-lived creds present?}
D -->|Yes| E[Secrets scanned & exfiltrated → cloud access, further spread]
D -->|No: temp creds| F[Nothing durable to steal]
C --> G{Pipeline requires in-pipeline approval?}
G -->|No| H[Auto-deploy to prod]
G -->|Yes| I[Human review catches change]Caveats
The post covers package-consumer practices only; maintainer-side protections are named but not detailed (the fetched text cuts off mid-sentence in that section). It also notes the tradeoff explicitly: approval workflows on every operation would "dramatically decrease deployment speed," so they should be applied strategically to sensitive workloads, not universally. Artifact signing is presented as a complementary layer, not a standalone control.
Organisations named here
- Shai-Hulud
- tea.xyz
CVEs named here
- CVE-2025-59144
Technologies named here
- npm registry
- AWS CLI
- AWS IAM Identity Center
- npm packages
- OpenID Connect federation
- AWS Secrets Manager
- Amazon GuardDuty
- AWS CloudTrail
- AWS Signer
- Amazon ECR
- Kyverno
- Notation
- AWS CodeArtifact
- AWS KMS
- Amazon Inspector
- Kiro
- AWS Security Hub
- AWS Config
- Amazon EventBridge
- Sigstore
- OpenSSF Malicious Packages Repository
- SBOMs
- MadPot
- npm
- SBOM
- chalk
- debug
Techniques named here
- Phishing of maintainer credentials
- Credential harvesting
- Typosquatting
- Sleeper package technique
- Zero-day-like malicious package publication
Threat actors named here
- Shai-Hulud
- Chalk/Debug
- tea.xyz token farming campaign
- axios incident
- MAL-2025-46974
- sleeper package
Related in Supply Chain


