T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Third-Party Package Executed with Access to AWS Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–17 and 42–57
Vulnerability Type: Unpinned dependency and unsafe runtime package resolution
Risk Level: MediumThe Skill declares
tsxas a dependency without an exact version, integrity hash, lockfile, or trusted registry configuration:yaml install: - kind: node package: tsx bins: [tsx]It subsequently instructs the Agent to execute the dependency through
npx:bash cd {baseDir} && npx tsx scripts/aws-health.tsThe same execution pattern is used for the optional arguments:
bash cd {baseDir} && npx tsx scripts/aws-health.ts --only ec2 cd {baseDir} && npx tsx scripts/aws-health.ts --only ecs cd {baseDir} && npx tsx scripts/aws-health.ts --only ecs --cluster my-cluster-nameTechnical Analysis
The dependency declaration does not constrain
tsxto a reviewed release. No package manifest, lockfile, package integrity value, or registry restriction is present in the supplied project. Consequently, the package version selected during installation may change after the Skill has been audited.Use of
npxadds runtime resolution risk. If an appropriate local executable is unavailable, depending on the environment and npm configuration,npxcan retrieve and execute a package from the configured package registry. This creates a supply-chain trust boundary in the Skill's execution path.The Skill requires the process environment to contain
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION, and optionallyAWS_SESSION_TOKEN. Third-party package code executed in that process can read inherited environment variables. A compromised package release, registry, or dependency resolution path could therefore expose AWS credentials or perform AWS operations under the credentials' permissions.The referenced
scripts/aws-health.tsimplementation is absent from the supplied ...[truncated 1869 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
tsxto an exact, reviewed version rather than using an unconstrained package name. - Add a package manifest and committed lockfile containing integrity metadata. Install dependencies using a reproducible command such as
npm ci. - Preinstall dependencies during a controlled build or installation stage. Do not permit invocation-time downloads.
- Invoke the locked local executable directly, such as
./node_modules/.bin/tsx, or use an npm script backed by the lockfile instead of runtimenpxresolution. - Configure an approved registry explicitly and enforce package integrity or provenance verification where supported.
- Add the missing
scripts/aws-health.tssource to the package so its behavior can be reviewed and verified before execution. - Run the Skill in a restricted environment with minimal filesystem and network access.
- Use short-lived AWS credentials, preferably through an IAM role or workload identity, and enforce a dedicated least-privilege policy limited to the required read-only EC2, ECS, and CloudWatch actions.
- Prevent inherited AWS credentials from being available to package installation lifecycle scripts. Install dependencies before injecting runtime credentials, and disable unnecessary npm lifecycle scripts where practical.
- Monitor CloudTrail for unexpected activity and rotate or revoke credentials immediately if dependency compromise is suspected.
- Pin
