T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Unpinned Third-Party Dependencies Installed Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 21–22
Vulnerability Type: Unverified and unpinned third-party package installation
Risk Level: MediumVulnerable Code Snippet
bash pip install bedrock-agentcore bedrock-agentcore-starter-toolkit langgraph uv tool install bedrock-agentcore-starter-toolkit # installs agentcore CLITechnical Analysis
The installation instructions retrieve and install the latest available versions of several third-party packages without version constraints, cryptographic hashes, a lockfile, or an explicitly trusted package index. Consequently, the installed dependency graph can change after the skill has been reviewed.
Python package installation can run package build or installation logic, while subsequently importing or invoking the packages executes their runtime code. If a named package or one of its transitive dependencies is compromised, replaced, or resolves from an attacker-controlled package source, following these instructions can cause attacker-supplied code to execute with the privileges of the user running
piporuv.The audited file does not itself retrieve a known malicious package, and no malicious payload is embedded in the project. The risk arises from the lack of dependency pinning and integrity verification.
Attack Path
- An attacker compromises a listed package, one of its transitive dependencies, or a package source used by the victim.
- The attacker publishes a malicious release or causes dependency resolution to select an attacker-controlled artifact.
- A user or agent follows the documented
pip installoruv tool installcommand. - The package manager downloads the unverified artifact because no reviewed version or hash is enforced.
- Malicious code executes during installation or when the installed library or
agentcorecommand is subsequently imported or invoked. - The payload operates with the invoking user ...[truncated 847 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a specifically reviewed version rather than resolving the latest release.
- Generate and commit a lockfile that includes the complete transitive dependency graph.
- Require cryptographic hashes for downloaded artifacts, such as with
pip --require-hashesand a hash-pinned requirements file. - Configure package installation to use an explicitly trusted index and prevent unintended fallback to untrusted or private indexes.
- Verify package provenance, maintainer identity, release signatures, and artifact checksums before approving upgrades.
- Install dependencies in a dedicated virtual environment or disposable sandbox using an unprivileged account.
- Keep AWS credentials and other secrets unavailable during dependency installation. Grant credentials only when needed at runtime and apply least-privilege IAM policies.
- Introduce automated dependency and supply-chain scanning, and review lockfile changes before accepting package updates.
Example hardened installation pattern:
bash python -m venv .venv . .venv/bin/activate python -m pip install --index-url https://pypi.org/simple \ --require-hashes -r requirements.lockThe referenced
requirements.lockshould contain reviewed, exact versions and hashes for all direct and transitive dependencies.
