T07 · Tool Hijacking and Spoofing
- Location
SKILL.md:118- Finding
Execution of an Unverified Mutable Deployment Script
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 118-125
Vulnerability Type: Unverified external local script execution
Risk Level: HighVulnerable Code
markdown ### Step 7: Update Website Data After writing MONITOR_LOG.md, run this command to update the website: exec command: bash ~/hormuz-website/scripts/update_and_deploy.sh This parses MONITOR_LOG.md into data.json and pushes to GitHub. Vercel auto-deploys on push. If the script fails, log the error but do not retry — the website will show the previous data until next cycle.Technical Analysis
The Skill instructs the agent to invoke
bashon a script located outside the reviewed package. The referenced~/hormuz-website/scripts/update_and_deploy.shfile was not included in the project and therefore could not be inspected. No integrity hash, trusted ownership check, permission validation, canonical path validation, or content verification is required before execution.Because the script is resolved beneath the runtime user's home directory, any party or process capable of creating or modifying that path can control the commands executed during Step 7. Explicitly invoking the file through
bashexecutes its contents regardless of whether the file itself has executable permissions.The documented purpose of the script includes parsing data, pushing changes to GitHub, and initiating a Vercel deployment. It may consequently operate in an environment containing repository or deployment credentials, increasing the impact of script substitution.
Attack Path
- An attacker gains write access to the runtime user's
~/hormuz-websitedirectory, thescriptssubdirectory, orupdate_and_deploy.sh. - The attacker creates or replaces
update_and_deploy.shwith commands that perform unauthorized actions, such as reading accessible credentials, modifying repository content, or executing additional local commands. - The monitoring workflow completes its collection a ...[truncated 1315 chars]
- An attacker gains write access to the runtime user's
- Remediation
View remediation
Remediation Suggestions
- Include the deployment script in the reviewed Skill package so its exact contents and changes can be audited.
- Reference the script through a fixed, canonical absolute path rather than a home-directory-relative path.
- Before execution, verify that the script and every parent directory are owned by the expected trusted account and are not writable by untrusted users or groups.
- Pin and validate a cryptographic hash or signed release of the script before invoking it. Abort deployment when verification fails.
- Execute the deployment process under a dedicated least-privileged account with access only to the required repository and deployment target.
- Use narrowly scoped, short-lived GitHub and deployment credentials. Do not expose unrelated credentials to the script environment.
- Require explicit operator approval before repository pushes or production deployment, particularly when the script or generated changes differ from expected content.
- Restrict the script's environment, filesystem access, and network destinations through sandboxing or container isolation.
- Review and validate the generated repository diff before pushing. Permit changes only to expected files such as the intended
data.json. - Log script identity, verified hash, generated changes, deployment result, and failures without recording secrets.
