Security checks for vulnerabilities and agentic risk
Overview
The skill is a coherent CNB Git/API helper, but it documents token-handling patterns that can expose powerful repository and API credentials.
Review this skill before installing if the CNB tokens have write, merge, or pipeline permissions. Prefer least-privilege, expiring tokens, avoid cloning with tokens embedded in URLs, check git remote -v after use, and rotate any token previously used with the documented clone pattern.
Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)
T09 · Insecure Skill Coding Practices
Warning
Location
SKILL.md:47
Finding
CNB credentials may be exposed through command-line arguments and persistent Git remote configuration
Content
View full analysis
Vulnerability Details
File Location: SKILL.md, lines 47-49 and 61-64 Vulnerability Type: Credential exposure through process arguments and repository configuration Risk Level: Medium
The documented Git command interpolates CNB_COOL_GIT_TOKEN directly into a URL passed as a command-line argument. After environment-variable expansion, the credential can become visible in the process argument list to local users or monitoring systems with sufficient process-inspection privileges.
More importantly, Git commonly records the clone URL as the repository's origin remote. This can cause the token-bearing URL to persist in .git/config, exposing the credential to users, tools, diagnostics, backups, or archives that can read the working copy.
The documented curl commands similarly interpolate CNB_COOL_API_TOKEN into an HTTP header supplied through the command line. Although this exposure is generally transient, the expanded token may be captured by process inspection, debugging output, command tracing, endpoint telemetry, or unsafe shell wrappers.
Attack Path
An authorized user exports valid CNB Git and API tokens and follows the documented commands.
The shell expands the secret variables before launching git or curl.
A local user, process-monitoring service, diagnostic collector, or other sufficiently privileged process captures the expanded command arguments.
For the Git command, the credential-bearing URL may also be stored persistently as the repository's origin in .git/config.
An attacker with access to the captured arguments, repository metadata, backup, or archive extracts the token.
The
...[truncated 759 chars]
Remediation
View remediation
Remediation Suggestions
Do not embed access tokens in Git clone URLs. Use a credential-free remote URL:
bash
Provide Git credentials through a protected credential helper, an appropriately secured GIT_ASKPASS implementation, or another CNB-supported authentication mechanism that does not place the token in process arguments or remote configuration.
Configure credential helpers to use encrypted or operating-system-backed storage where available. Avoid plaintext credential stores.
Supply API credentials through a protected curl configuration or standard-input mechanism rather than an expanded command-line header. Ensure any temporary configuration has restrictive permissions and is deleted immediately after use.
Disable shell tracing around secret-bearing operations and ensure logs, diagnostics, and telemetry redact authorization headers and credential-bearing URLs.
Verify cloned repositories with:
bash
git remote -v
If a token is present, replace the remote URL with a credential-free value:
bash
Rotate any token previously used with the documented clone pattern because it may remain in repository metadata, process telemetry, shell diagnostics, or backups.
Grant each token only the minimum repository and API permissions required, use separate tokens for distinct functions, and apply expiration and regular rotation policies.