Review ID: d26f6c1926ddGenerated: 2026-03-08T23:46:51.767Z
CHANGES REQUESTED
17
Total Findings
8
Critical
2
Medium
7
Low
36 of 108 Agents Deployed
DiamondPlatinumGoldSilverBronzeHR Roasty
Agent Tier: HR Roasty
brabos-ai/code-addiction →
main @ baafd05
AIAI Threat Analysis
Loading AI analysis...
17 raw scanner findings — 8 critical · 2 medium · 7 low
Raw Scanner Output — 156 pre-cleanup findings
⚠ Pre-Cleanup Report
This is the raw, unprocessed output from all scanner agents before AI analysis. Do not use this to fix issues individually. Multiple agents attack from different angles and frequently report the same underlying vulnerability, resulting in significant duplication. Architectural issues also appear as many separate line-level findings when they require a single structural fix.

Use the Copy Fix Workflow button above to get the AI-cleaned workflow — it deduplicates findings, removes false positives, and provides actionable steps. This raw output is provided for transparency and audit purposes only.
HIGHFeature injection system modifies command files without sandboxing
cli/src/features.js:1
[AGENTS: Infiltrator]attack_surface
The features system reads fragment files and injects content into command markdown files based on feature markers. This creates a code injection vector if an attacker can modify fragment files or the manifest.json. The system modifies files in-place without creating backups or validation of the injected content.
Suggested Fix
Validate fragment file content, create backups before modification, and implement a rollback mechanism for failed injections.
HIGHUnsafe regex construction with user input
cli/src/features.js:64
[AGENTS: Sentinel]input_validation
The `escapeRegex` function is used to escape user input for regex patterns, but the regex patterns in `injectSections` and `removeSections` are constructed by concatenating user-controlled `featureName` and `sectionName` values. If `escapeRegex` fails or is bypassed, this could lead to regex injection attacks.
Suggested Fix
Use parameterized regex patterns or validate featureName and sectionName before constructing regex: const SAFE_NAME_REGEX = /^[a-zA-Z0-9_-]+$/;
HIGHRegular expression denial of service (ReDoS) vulnerability
cli/src/features.js:85
[AGENTS: Razor]security
The `injectSections` function uses `escapeRegex` which doesn't properly escape all regex special characters, and the regex patterns are built dynamically from user-controlled feature names and section names. An attacker could craft malicious feature/section names causing catastrophic backtracking.
Suggested Fix
Use a safer approach like string replacement instead of regex, or properly escape all regex special characters including Unicode characters.
HIGHUnsafe directory traversal in uninstaller
cli/src/uninstaller.js:26
[AGENTS: Razor - Siege]dos, security
**Perspective 1:** The `walkDir` function recursively traverses directories without protection against symbolic link attacks or infinite recursion. An attacker could create a symlink loop or symlink to sensitive system files, causing the uninstaller to delete unintended files. **Perspective 2:** The walkDir function recursively traverses directories without limiting depth or total files processed. An attacker could create deeply nested directory structures with many files to cause stack overflow or excessive CPU usage during uninstall.
Suggested Fix
Add protection against symlink attacks: ```javascript const stat = fs.lstatSync(full); if (stat.isSymbolicLink()) { // Skip or handle symlinks appropriately continue; } ```
HIGHPath traversal risk in walkDir function
cli/src/uninstaller.js:68
[AGENTS: Sentinel]input_validation
The `walkDir` function recursively reads directories without validating that entries are not symlinks or that paths don't contain traversal sequences. An attacker could plant symlinks to sensitive system files in ADD directories.
Suggested Fix
Add symlink check: if (entry.isSymbolicLink()) continue; Also normalize paths and check they remain within expected directory.
HIGHInsecure file restoration from ZIP without path validation
cli/src/validator.js:83
[AGENTS: Razor]security
The `repairFiles` function extracts files from ZIP archives during repair operations without validating that the extracted paths stay within the intended directory. This could lead to path traversal attacks when restoring files.
Suggested Fix
Add path validation before writing files: ```javascript const resolvedPath = path.resolve(cwd, filePath); const expectedBase = path.resolve(cwd); if (!resolvedPath.startsWith(expectedBase)) { throw new Error('Invalid file path'); } ```
HIGHGit command execution with potential injection via branch names
framwork/.codeadd/scripts/get-branch-metadata.sh:19
[AGENTS: Prompt - Specter]command_injection, llm_security
**Perspective 1:** The script executes 'git branch --show-current' and uses branch names in various git commands. If branch names contain malicious characters (semicolons, backticks, etc.), this could lead to command injection. **Perspective 2:** The script executes git commands with branch names that could come from untrusted sources. While the script uses parameter expansion, if BRANCH_NAME contains malicious characters, it could affect git command execution.
Suggested Fix
Sanitize branch names before using them in git commands, use '--' argument separator, and consider using the git plumbing commands instead of porcelain commands.
HIGHPath traversal in feature directory validation
framwork/.codeadd/scripts/log-iteration.sh:148
[AGENTS: Gateway]edge_security
Line 148: FEATURE_DIR="docs/features/${FEATURE_ID}" uses unvalidated FEATURE_ID from git branch name. An attacker could create a branch with directory traversal sequences (e.g., '../../etc/passwd') to access files outside the intended directory.
Suggested Fix
Validate FEATURE_ID against regex: ^[0-9]{4}[A-Z]-[a-zA-Z0-9_-]+$. Use realpath with base directory constraint: realpath --relative-base="docs/features" "$FEATURE_DIR".
HIGHUnsafe file writing with user-controlled content
framwork/.codeadd/scripts/log-iteration.sh:207
[AGENTS: Gateway]edge_security
Lines 207-219 write user-provided WHAT_TRUNCATED and SLUG values directly to files without HTML/script escaping. If these files are served via web interface, this could lead to stored XSS attacks.
Suggested Fix
Escape HTML special characters: printf '%s' "$WHAT_TRUNCATED" | sed 's/[&<>"]/\&/g'. Use jq -R for JSON-safe encoding if output is JSON.
HIGHShell script with find and grep commands using unsanitized input
framwork/.codeadd/scripts/next-id.sh:11
[AGENTS: Specter]command_injection
The next-id.sh script uses find and grep commands with directory paths. While the TYPE_LETTER is validated with regex, the script doesn't validate the DOCS_DIR path or handle special characters in directory names that could lead to command injection.
Suggested Fix
Use parameter expansion to sanitize paths, quote all variables, and consider using safer alternatives like Node.js scripts for file operations.
HIGHCommand injection in find and grep pipeline
framwork/.codeadd/scripts/next-id.sh:41
[AGENTS: Prompt]llm_security
The next-id.sh script uses find and grep with regex patterns that include user-controlled TYPE_LETTER variable. While TYPE_LETTER is validated with regex, the find command uses directory paths that could be manipulated if the script runs in a malicious environment.
Suggested Fix
Use absolute paths for find command and additional validation on DOCS_DIR path.
HIGHShell script executes arbitrary arguments without validation
framwork/.codeadd/scripts/run-tests.sh:8
[AGENTS: Specter]command_injection
The test runner script passes all arguments directly to npx bats without validation: 'npx bats "$SCRIPT_DIR"/*.bats "$@"'. This could allow command injection if malicious arguments are passed to the script.
Suggested Fix
Validate and sanitize script arguments before passing them to npx, or use explicit argument parsing with allowed options only.
MEDIUMDirectory overwrite confirmation bypass
cli/src/installer.js:210
[AGENTS: Chaos - Sentinel]edge_cases, input_validation
**Perspective 1:** When .codeadd/ exists, promptConfirm asks user, but if user cancels, the error is thrown but not caught. Process exits with unhandled error. **Perspective 2:** The `resolveInstallSource` function accepts a `requestedVersion` parameter without proper validation. An attacker could inject malicious version strings containing path traversal, command injection, or extremely long strings that could cause memory issues or unexpected behavior.
Suggested Fix
Add validation: const VERSION_REGEX = /^[a-zA-Z0-9._\-]+$/; if (requestedVersion && !VERSION_REGEX.test(requestedVersion)) throw new Error('Invalid version format'); Enforce maximum length (e.g., 100 characters).
MEDIUMUnsafe file operations without validation
framwork/.codeadd/commands/add-done.md:1
[AGENTS: Infiltrator - Pedant]attack_surface, correctness
**Perspective 1:** The script performs file operations (reading, writing) on paths constructed from user input (FEATURE_ID) without proper validation. This could lead to path traversal attacks or writing to unintended locations if FEATURE_ID contains '../' or other dangerous characters. **Perspective 2:** The /add-done command includes a --force flag that bypasses quality gates, review requirements, and epic completion checks. This creates a security bypass mechanism that could allow unauthorized or untested code to be merged into production. The command automatically executes merges without human confirmation when using --force or --yolo modes, potentially allowing malicious code to bypass security reviews. **Perspective 3:** The merge execution in STEP 6 performs multiple git operations but doesn't implement proper rollback if any step fails. This could leave the repository in an inconsistent state (partially merged, partially committed).
Suggested Fix
Remove or restrict the --force flag functionality. Require manual approval for bypassing security gates. Implement audit logging for all force merges with justification requirements.
MEDIUMUnbounded file system scanning without resource limits
framwork/.codeadd/scripts/architecture-discover.sh:0
[AGENTS: Egress - Gateway - Infiltrator - Lockdown - Passkey - Prompt - Trace - Wallet]attack_surface, audit, configuration, credentials, data_exfiltration, denial_of_wallet, edge_security, llm_security, logging
**Perspective 1:** The architecture discovery script performs extensive file system operations with 'find' commands scanning up to depth 5 across the entire codebase. If this script is exposed as an API endpoint or triggered by unauthenticated users, attackers could cause denial-of-wallet by repeatedly triggering expensive disk I/O operations, especially on large codebases or networked storage systems. The script has no execution time limits, concurrency controls, or resource caps. **Perspective 2:** The script uses `find` with `-path` patterns that include unsanitized directory names from the filesystem. While the patterns are hardcoded, the script also processes directory paths read from `find` output and passes them to `basename` and other commands. If a directory name contains shell metacharacters (newlines, semicolons, etc.), it could lead to command injection in the `while` loops that use `read` and variable expansion. **Perspective 3:** Lines 260-340 extract and output dependency lists from package.json, requirements.txt, etc. This could expose internal package names, versions, and potentially internal registry URLs that shouldn't be logged. **Perspective 4:** The script scans the entire codebase structure but doesn't log who ran it, when, or why. This could be used by attackers to map the codebase without detection. **Perspective 5:** The script uses find, grep, sed, awk on directory structures. If directory or file names contain malicious characters (newlines, semicolons), they could inject commands into pipelines. While set -euo pipefail helps, insufficient quoting and lack of input sanitization remain risks. **Perspective 6:** The `architecture-discover.sh` script outputs detailed project structure, file extensions, dependency lists, and environment file names (`.env`, `.env.local`). This information could be captured by logging systems or exfiltrated by a compromised build process, revealing internal project layout and potential attack surfaces (e.g., config files). **Perspective 7:** The script scans for environment files (.env, .env.local, etc.) and lists them without warning about credential exposure. This could lead to accidental exposure of secrets if the script output is logged or shared. **Perspective 8:** The script enumerates project structure, dependencies, and environment files. While intended for analysis, this could leak sensitive information if output is exposed (e.g., in logs, error messages). The script doesn't filter sensitive paths like `.env`, `.git/config`, or credential files. **Perspective 9:** The script uses 'find' commands with user-controlled or untrusted directory paths without sanitization. While currently scanning '.', if used in other contexts could be vulnerable to path traversal.
Suggested Fix
Restrict execution of this script to trusted environments. Ensure its output is not written to persistent logs accessible to unauthorized parties. Consider generating reports only on-demand in secure contexts.
MEDIUMMissing Input Validation in Branch Name Handling
framwork/.codeadd/scripts/done.sh:0
[AGENTS: Compliance - Egress - Gateway - Infiltrator - Lockdown - Passkey - Trace - Wallet]attack_surface, audit, configuration, credentials, data_exfiltration, denial_of_wallet, edge_security, logging, regulatory
**Perspective 1:** The script uses `CURRENT_BRANCH=$(git branch --show-current)` and later passes it to `git` commands and `eval`. While the branch name comes from git, if an attacker can control the branch name (e.g., via a malicious repository), they could inject shell commands through special characters. The script does not sanitize or validate the branch name before using it in command substitution or eval. **Perspective 2:** Lines 119-145 output detailed file lists including modified, staged, and untracked files. This could expose sensitive file paths, configuration files, or credentials if logs are captured. No redaction or filtering of sensitive patterns. **Perspective 3:** The done.sh script performs extensive git operations including 'git diff', 'git push', 'git merge', 'git tag', and branch operations. If exposed as an endpoint, attackers could trigger unlimited git operations leading to high compute costs on git hosting services (GitHub, GitLab, etc.) and potential rate limit exhaustion. The script also pushes to remote repositories without checking if the user has appropriate permissions. **Perspective 4:** The script performs multiple git operations (push, pull, merge) without verifying that the user has appropriate credentials or that the remote repository is authentic. This could lead to accidental pushes to wrong repositories or credential exposure if the remote is compromised. **Perspective 5:** The script executes `git push origin --delete "$CURRENT_BRANCH"` without validating branch ownership or requiring confirmation. An attacker with commit access could modify this script to delete protected branches or other users' branches. **Perspective 6:** Lines 298-299 delete local and remote branches without verifying the merge was successful or that the branch is safe to delete. This could lead to data loss if the merge failed or was incomplete. **Perspective 7:** Lines 154-160 attempt to diff against 'origin/$MAIN_BRANCH' without verifying the remote branch exists or is trustworthy. This could lead to incorrect comparisons or execution against malicious remote. **Perspective 8:** The script performs git operations (merge, push, branch deletion) but doesn't log these actions with user context, timestamps, or security implications. Malicious actors could use similar scripts to hide unauthorized changes. **Perspective 9:** Merge script automates production changes without: 1) Change approval verification 2) Separation of duties enforcement 3) Audit trail for production deployments 4) Rollback capability verification. Violates SOC 2 change management controls. **Perspective 10:** The `done.sh` script outputs `CHANGED_FILES` and `UNCOMMITTED_FILES` lists in its context mode. If these outputs are captured in logs (e.g., CI/CD logs, monitoring systems), they could reveal the names of files containing sensitive logic, configuration, or data. An attacker could use this to target specific files.
Suggested Fix
Add change management controls: 1) Require approval verification before merge 2) Enforce separation of duties (different users for development and deployment) 3) Create immutable audit log of all production changes 4) Verify rollback procedures are tested.
MEDIUMMissing input validation for branch names
framwork/.codeadd/scripts/done.sh:1
[AGENTS: Sentinel - Supply - Vault]input_validation, secrets, supply_chain
**Perspective 1:** The script uses `git branch --show-current` and passes the branch name directly to git operations without sanitization. An attacker could create a branch with malicious characters (spaces, semicolons, quotes, newlines) that could be interpreted as command injection when used in subsequent git commands or shell expansions. **Perspective 2:** The done.sh script handles branch merging and cleanup but doesn't sign build artifacts or generate provenance attestations. No SLSA compliance or in-toto attestations are created for the merged code. **Perspective 3:** The script contains hardcoded git commit messages with 'Co-Authored-By: ADD <noreply@brabos.ai>'. While this is a noreply address, it exposes internal infrastructure details and could be used for social engineering or identifying internal systems. **Perspective 4:** The script extracts FEATURE_ID from branch metadata but doesn't validate its format before using it in git operations and tag deletion. A malformed FEATURE_ID could contain shell metacharacters leading to injection.
Suggested Fix
Validate branch name against a safe pattern: `if [[ ! "$CURRENT_BRANCH" =~ ^[a-zA-Z0-9][a-zA-Z0-9._-]*$ ]]; then echo "Invalid branch name"; exit 1; fi`
MEDIUMShell script lacks input validation and sanitization
framwork/.codeadd/scripts/init.sh:1
[AGENTS: Egress - Gateway - Infiltrator - Lockdown - Mirage - Prompt - Razor - Recon - Siege - Supply - Trace - Vault]attack_surface, configuration, data_exfiltration, dos, edge_security, false_confidence, info_disclosure, llm_security, logging, secrets, security, supply_chain
**Perspective 1:** The script uses unvalidated environment variables and command outputs (e.g., OWNER_NAME, OWNER_NIVEL, OWNER_IDIOMA) without sanitization. An attacker could inject malicious values into these variables, leading to command injection or other attacks when the script is executed in a CI/CD pipeline or by other automation. **Perspective 2:** The init.sh script processes user input (OWNER.md, git branch detection) without any validation or sanitization. This script is likely executed by API gateway or reverse proxy endpoints, but lacks input validation for paths, branch names, and file content. Malicious input could lead to path traversal, command injection, or file system access. **Perspective 3:** The init.sh script lacks proper input validation, uses command substitution without validation, and has potential for command injection through environment variables or file paths. It executes multiple external commands (git, grep, sed, find, etc.) without sanitizing inputs. The script runs with set -euo pipefail but doesn't handle edge cases like missing dependencies or malformed input files. **Perspective 4:** The initialization script handles project setup but contains no artifact signing, verification, or integrity checks. Scripts can be modified without detection, and there's no cryptographic verification of script authenticity before execution. **Perspective 5:** The init.sh script contains multiple error messages that could leak sensitive information about the system environment, file paths, and git status. While not containing direct credentials, error handling that outputs detailed system information could aid attackers in reconnaissance. **Perspective 6:** Lines 77-78: find "$DOCS_DIR" -maxdepth 1 -type d -regex ".*/[0-9][0-9][0-9][0-9][A-Z]-.*" 2>/dev/null | xargs -r -n1 basename | sort. An attacker could create many directories to exhaust CPU and memory. **Perspective 7:** The script executes external scripts (`get-main-branch.sh`, `get-branch-metadata.sh`, `next-id.sh`) without validating their integrity or checking for malicious content. An attacker could replace these scripts to execute arbitrary commands. **Perspective 8:** This initialization script outputs detailed system information including owner details, git metadata, feature counts, architecture details, stack detection, module listings, and recent changelogs. If accessible, this provides attackers with a complete fingerprint of the system state, architecture, and recent changes. **Perspective 9:** The project initialization and build process lacks SBOM generation. No CycloneDX or SPDX SBOM is created to track dependencies, making supply chain auditing impossible. Critical for vulnerability management and license compliance. **Perspective 10:** The script uses 'set -euo pipefail' but doesn't implement proper input validation for all arguments, doesn't sanitize environment variables, and may be vulnerable to path injection attacks when executing external scripts. **Perspective 11:** The init.sh script outputs owner information (name, level, language), git branch details, feature IDs, and recent changelog summaries to stdout. This data could be captured in logs and may expose sensitive project metadata, feature names, and internal IDs to unauthorized parties if logs are not properly secured. **Perspective 12:** The init.sh script collects git metadata including branch names, uncommitted file counts, and feature IDs, then outputs this information. If branch names contain sensitive information (e.g., 'feature/1234-fix-security-breach', 'hotfix/leaked-api-key'), this data is exposed in logs and command outputs. The script doesn't sanitize or filter potentially sensitive branch names before output. **Perspective 13:** The init.sh script executes multiple shell commands with user-controlled inputs from git branch names and file system paths. Malicious branch names or filenames could contain shell metacharacters leading to command injection. **Perspective 14:** The script checks for LSP availability with `command -v lsp` and claims 'LSP:AVAILABLE' and 'LSP_PRIORITY:MANDATORY' but doesn't verify that LSP is actually functional, properly configured, or has access to the codebase. This creates false confidence that code analysis capabilities are available when LSP may be broken or misconfigured. **Perspective 15:** The script detects technology stack by grepping package.json for strings like '@nestjs', 'express', 'react'. This creates false confidence about the actual stack - a project could have these in devDependencies or comments but not actually use them. The detection doesn't verify actual usage or configuration.
Suggested Fix
Implement branch name sanitization to remove or hash sensitive patterns. Filter out branch names containing keywords like 'secret', 'key', 'token', 'password', 'breach'. Consider hashing branch names for logging purposes.
MEDIUMCommand injection via unsanitized arguments
framwork/.codeadd/scripts/log-iteration.sh:1
[AGENTS: Egress - Exploit - Gateway - Infiltrator - Lockdown - Mirage - Prompt - Razor - Recon - Siege - Supply - Trace - Vault]attack_surface, audit_trail, configuration, data_exfiltration, dos, edge_security, false_confidence, info_disclosure, llm_security, logging, secrets, security, supply_chain
**Perspective 1:** The script passes user-controlled arguments (`TYPE`, `SLUG`, `WHAT`, `FILES`) directly to `printf` and file operations without proper sanitization. An attacker could inject shell metacharacters (e.g., backticks, `$()`, `;`) to execute arbitrary commands. **Perspective 2:** The script accepts TYPE, SLUG, WHAT, FILES arguments directly from user input without validation. These values are used in file operations and printf statements. An attacker could inject shell commands via SLUG or FILES parameters containing special characters like ;, $(), `, or newlines. **Perspective 3:** The log-iteration.sh script accepts user-controlled arguments (TYPE, SLUG, WHAT, FILES) and uses them in file operations without proper sanitization. The script constructs file paths using these inputs and writes to filesystem. Potential for path traversal attacks via SLUG parameter or command injection via WHAT/FILES parameters. The script also executes git commands with potentially malicious branch names. **Perspective 4:** The `log-iteration.sh` script accepts multiple user-controlled arguments (TYPE, SLUG, WHAT, FILES) and passes them to shell commands without proper escaping. Lines 217-218 use `printf` with format strings containing user input, which could lead to format string vulnerabilities. The script also uses unquoted variable expansions in command substitutions. **Perspective 5:** The script uses `DATE_TODAY=$(date +"%Y-%m-%d" 2>/dev/null || true)` which suppresses errors and continues with empty date if the date command fails. This could lead to malformed iteration logs with empty dates, creating false confidence in logging integrity. **Perspective 6:** The log-iteration.sh script contains detailed error messages that could expose file system paths, git branch information, and internal system details. While not containing direct API keys, this information leakage could be used in conjunction with other vulnerabilities. **Perspective 7:** The script appends to iterations.md without any size limit or rotation. An attacker or bug could cause infinite iterations, leading to disk exhaustion. **Perspective 8:** Line 185: grep -oE '^## I([0-9]+)' "$ITERATIONS_FILE" reads the entire file each time. If iterations.md grows large (DoS attack), this becomes expensive and could exhaust CPU. **Perspective 9:** Lines 176-177: find "$DOCS_DIR" -maxdepth 2 -name "changelog.md" -type f -print0 | xargs -0 -r ls -t 2>/dev/null | head -5. If an attacker creates many feature directories, this find operation could become expensive and slow down the system. **Perspective 10:** The script writes user-controlled content (`WHAT`, `SLUG`, etc.) directly to a file (`iterations.md`) without sanitization. This could lead to injection of malicious Markdown, HTML, or script content if the file is later rendered in a web interface. **Perspective 11:** The iteration logging script creates feature documentation but lacks provenance metadata (build timestamp, commit hash, builder identity, dependencies). Artifacts cannot be traced back to their source. **Perspective 12:** The script accepts user-controlled arguments without proper sanitization, writes to files without validation, and uses potentially unsafe command substitution. The --feature and --epic flags accept arbitrary values that could be used for path traversal or injection attacks. **Perspective 13:** The log-iteration.sh script appends detailed iteration entries (type, slug, what, files, command, feature/epic markers) to iterations.md. This creates an audit trail of development activities, but the file is stored in plain text within the feature directory without encryption or access controls. Sensitive information about feature implementation, code changes, and internal IDs could be exposed. **Perspective 14:** The log-iteration.sh script records development iterations including file paths and change descriptions. If developers work on security-sensitive files (e.g., 'src/auth/secrets.ts', 'libs/encryption/keys.ts') or describe security fixes ('fixed JWT secret leak', 'patched SQL injection'), this sensitive information is written to iterations.md files. These logs become part of the documentation and could be exposed through version control or documentation exports. **Perspective 15:** The script uses `git rev-parse --abbrev-ref HEAD 2>/dev/null || true` which suppresses errors and returns empty string on failure. This creates false confidence that branch detection worked when git may not be available or the repo may be in a broken state. The script continues execution with potentially incorrect feature ID detection. **Perspective 16:** This script reveals detailed information about the development workflow, iteration tracking, feature/epic management, and internal processes. While not directly exposing credentials, it provides attackers with insights into development practices and project structure. **Perspective 17:** The iteration logging script appends plain text to markdown files without digital signatures or hash chains. An attacker with filesystem access could modify historical iteration logs to hide malicious changes or fabricate work history.
Suggested Fix
Validate all input parameters against whitelist patterns, sanitize file paths using basename and realpath, use parameterized commands instead of string concatenation, and implement strict input validation for branch names and file paths.
MEDIUMHardcoded GitHub CLI installation script with sudo privileges
framwork/.codeadd/skills/dev-environment-setup/SKILL.md:0
[AGENTS: Compliance - Egress - Gateway - Infiltrator - Lockdown - Passkey - Prompt]attack_surface, configuration, credentials, data_exfiltration, edge_security, llm_security, regulatory
**Perspective 1:** The skill instructs users to run `curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg` which downloads and executes a script with sudo privileges. This is a classic supply chain attack vector where an attacker could compromise the GitHub CLI installation endpoint and execute arbitrary code with root privileges on the user's system. **Perspective 2:** The skill instructs users to run `curl -fsSL https://claude.ai/install.sh | bash` and `curl -fsSL https://opencode.ai/install | bash` which downloads and executes arbitrary shell scripts from third-party domains. These scripts could contain malicious code that steals credentials, installs backdoors, or compromises the development environment. No checksum verification or code review is performed. **Perspective 3:** The skill instructs users to run `curl -fsSL https://claude.ai/install.sh | bash` and similar commands for AI tool installation. These are arbitrary code execution vectors if the remote URLs are compromised. No integrity verification (checksums, GPG signatures) is performed. **Perspective 4:** The skill instructs users to run commands like 'curl -fsSL https://claude.ai/install.sh | bash' and 'curl -fsSL https://opencode.ai/install | bash'. These are classic code execution vectors; if the URLs are compromised or the user's environment is MITM'd, arbitrary code runs with user privileges. The agent is facilitating this without validation. **Perspective 5:** The skill instructs users to run `gh auth login` which creates and stores a GitHub personal access token. This token could be captured by malicious scripts, logged in shell history, or exposed in CI/CD logs if the setup commands are automated. The token grants access to the user's GitHub repositories and potentially other scopes. **Perspective 6:** The skill instructs users to run `gh auth login` without specifying security best practices such as using hardware security keys, limiting token scopes, or setting token expiration. This could lead to overly permissive tokens being created that persist indefinitely. **Perspective 7:** The skill instructs users to install tools (Claude Code, OpenCode) via `curl -fsSL https://claude.ai/install.sh | bash` and similar commands. This pattern is inherently risky as it executes arbitrary code from the internet without verification of integrity or authenticity. An attacker could compromise the hosting server or perform a MITM attack to inject malicious code. **Perspective 8:** The skill modifies `.vscode/settings.json` to set WSL as default terminal. This could be exploited if an attacker controls the WSL distribution name or path. The merge operation doesn't validate the distro name, allowing path traversal or command injection via crafted distro names. **Perspective 9:** Multiple sections instruct users to install software via 'curl -fsSL [URL] | bash' pattern (lines 200, 204, 232, 236, 268, 272). This is insecure as it executes arbitrary code from the internet without verification, susceptible to MITM attacks or compromised servers. **Perspective 10:** The script checks if 'gh' CLI is installed but doesn't verify authentication scope or token permissions. An attacker could install a malicious gh CLI or use compromised credentials. **Perspective 11:** The skill uses commands like 'uname -s', '$env:OS', 'wsl -l -v' to detect OS and tools. If these commands are spoofed (e.g., via malicious environment variables or aliases), the agent could be tricked into installing wrong packages or executing harmful scripts. No validation of command outputs. **Perspective 12:** Development environment setup lacks security controls: 1) No validation of secure configuration for development tools 2) Missing guidance on secure credential handling 3) No separation of production vs development access 4) No audit logging for development activities.
Suggested Fix
Add security requirements: 1) Require secure configuration for all installed tools 2) Add guidance on secure credential storage (not in plaintext) 3) Enforce separation of production access credentials 4) Enable audit logging for development activities.
MEDIUMUnverified script execution from external sources
framwork/.codeadd/skills/dev-environment-setup/SKILL.md:109
[AGENTS: Supply]supply_chain
The skill instructs users to execute `curl -fsSL https://claude.ai/install.sh | bash` and `curl -fsSL https://opencode.ai/install | bash` without verifying script integrity or authenticity. This is a classic supply chain attack vector where compromised scripts could execute arbitrary code.
Suggested Fix
Add verification steps: 1) Download script first, 2) Verify checksum against published values, 3) Review script contents, 4) Then execute. Or use package managers with signed packages.
MEDIUMUnverified GitHub CLI installation script
framwork/.codeadd/skills/dev-environment-setup/SKILL.md:131
[AGENTS: Supply]supply_chain
The skill shows commands to install GitHub CLI via `curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg` without verifying the GPG key's authenticity. An attacker could compromise the keyring and sign malicious packages.
Suggested Fix
Verify the GPG key fingerprint against GitHub's official documentation before installation. Use package managers with signed repositories instead of direct curl|sudo pipelines.
MEDIUMRelease script performs git operations without authentication or verification
scripts/release.sh:1
[AGENTS: Chaos - Infiltrator - Supply]attack_surface, edge_cases, supply_chain
**Perspective 1:** The release.sh script automatically merges main into production and pushes to remote without requiring authentication or manual approval. This could allow unauthorized code deployment if the script is executed by mistake or by an unauthorized user. The script also doesn't verify that the code being merged has passed tests or other quality gates. **Perspective 2:** The release script pushes code to production but doesn't sign artifacts, generate checksums, or create provenance attestations. No verification of build integrity before release. The script merges main to production without verifying the integrity of the artifacts being released. **Perspective 3:** The release process doesn't ensure build reproducibility. No evidence of pinned build dependencies, fixed timestamps, or deterministic build outputs. This makes it impossible to verify that the released artifacts correspond to the source code. **Perspective 4:** Script uses 'set -e' but if any git command fails (e.g., network issue during fetch, merge conflict), script may exit halfway leaving repository in dirty state. No rollback or cleanup.
Suggested Fix
Add artifact signing with GPG or Sigstore cosign, generate SHA256 checksums for all release artifacts, and create in-toto attestations for build provenance. Verify all dependencies before release.
MEDIUMCommand-line argument parsing vulnerable to injection
cli/bin/codeadd.js:67
[AGENTS: Chaos - Gateway - Phantom]api_security, edge_cases, edge_security
**Perspective 1:** The getArgValue function parses command-line arguments without proper validation. Malicious version or branch names could contain shell injection characters or path traversal sequences that might be passed to underlying system calls. **Perspective 2:** The CLI has no rate limiting for operations like install, update, or validate. An attacker could automate rapid requests to GitHub API through the CLI, potentially causing denial of service or hitting GitHub API rate limits. **Perspective 3:** User can specify both `--version` and `--branch` simultaneously (e.g., `install --version v1.0.0 --branch main`). The code will use branch because requestedBranch takes precedence in resolveInstallSource, but this may be unexpected and cause confusion.
Suggested Fix
Implement per-user rate limiting for CLI operations, especially those making external API calls. Consider adding delays between operations or limiting concurrent executions.
MEDIUMInstall command accepts arbitrary branch names without source verification
cli/bin/codeadd.js:74
[AGENTS: Weights]model_supply_chain
The install command accepts --branch <name> parameter which can be any branch name. This allows installation from arbitrary, potentially malicious branches in the repository or forks. There's no verification that the branch comes from the expected repository owner or maintainer.
Suggested Fix
Restrict branch installations to known safe branches (main, develop) or implement branch signature verification. Consider requiring explicit commit SHAs instead of branch names.
MEDIUMOutdated adm-zip dependency with known vulnerabilities
cli/package.json:1
[AGENTS: Supply - Tripwire]dependencies, supply_chain
**Perspective 1:** adm-zip version 0.5.10 is outdated and has known vulnerabilities including CVE-2022-37434 (path traversal) and CVE-2022-45198 (directory traversal). Current version is 0.5.12 which addresses these issues. **Perspective 2:** Dependencies use caret (^) version ranges which can lead to unexpected breaking changes or security vulnerabilities when transitive dependencies update automatically. This includes @clack/prompts and adm-zip. **Perspective 3:** The CLI package.json doesn't have a corresponding package-lock.json file, which means installations may use different dependency versions across environments, potentially introducing security vulnerabilities. **Perspective 4:** The package.json doesn't include scripts for security auditing (npm audit) or dependency vulnerability scanning. There's no evidence of regular security checks in the CI workflow. **Perspective 5:** The package.json shows no SBOM generation (CycloneDX, SPDX) in the build scripts. There's no evidence of software composition analysis or dependency vulnerability scanning in the CI/CD pipeline.
Suggested Fix
Add 'npm run sbom' script generating CycloneDX JSON, integrate with OWASP Dependency-Check or Snyk, and publish SBOM with releases.
MEDIUMFeature injection modifies files without integrity verification
cli/src/features.js:357
[AGENTS: Mirage - Trace]false_confidence, logging
**Perspective 1:** The enableFeature and disableFeature functions modify command files by injecting or removing content between markers, then update the manifest hashes. However, there's no verification that the modifications were applied correctly or that the resulting files are syntactically valid. The system assumes the injection worked and updates hashes accordingly, creating false confidence in the integrity of modified files. **Perspective 2:** Feature enable/disable operations modify command files but aren't logged. This creates a gap in tracking who changed which features and when, which is important for security configuration management.
Suggested Fix
Add validation after file modification to ensure markers are properly balanced and the resulting file is parseable before updating the manifest hash.
MEDIUMNo rate limiting or authentication for GitHub API calls
cli/src/github.js:1
[AGENTS: Infiltrator - Tripwire]attack_surface, dependencies
**Perspective 1:** The GitHub API calls don't include authentication tokens and may hit rate limits, causing installation failures. No retry logic or fallback mechanisms are implemented. **Perspective 2:** The code makes direct fetch calls to GitHub's public API and raw zip download endpoints. This exposes the tool to GitHub API rate limiting issues and potential dependency on external service availability. An attacker could also potentially serve malicious content if they can redirect or poison DNS for github.com.
Suggested Fix
Add retry logic with exponential backoff, implement local caching of releases, and consider using a proxy service with authentication for enterprise environments.
MEDIUMMutable 'main' branch used as installation source
cli/src/installer.js:240
[AGENTS: Supply]supply_chain
The installer allows installation from the 'main' branch which is mutable. An attacker with commit access could push malicious code that would be automatically installed by users using '--version main' or when releases aren't available.
Suggested Fix
Remove branch installation support or at minimum require explicit user confirmation with warning about mutability. Prefer immutable tags only.
MEDIUMUnbounded ZIP extraction without size validation
cli/src/installer.js:243
[AGENTS: Siege]dos
The installer downloads and extracts ZIP files from GitHub without validating the total extracted size or individual file sizes. An attacker could craft a malicious ZIP bomb with deeply nested directories or extremely large files, causing disk exhaustion and memory issues during extraction.
Suggested Fix
Implement size limits: validate total extracted size, maximum file count, and maximum individual file size before extraction. Use streaming extraction for large files.
MEDIUMCorrupted manifest leads to unsafe file deletion
cli/src/uninstaller.js:18
[AGENTS: Chaos]edge_cases
When manifest is corrupted, uninstall falls back to deleting all files in ADD directories. This could delete user files not installed by ADD if they were added after installation.
Suggested Fix
When manifest is corrupted, require explicit --force flag and warn about potential data loss.
MEDIUMAutomatic updates without cryptographic verification
cli/src/updater.js:89
[AGENTS: Supply]supply_chain
The update process automatically downloads and replaces files without requiring cryptographic verification from the user. Combined with lack of artifact signing, this creates a silent update vulnerability.
Suggested Fix
Require signed updates, implement TUF (The Update Framework) pattern, or at minimum require user confirmation for major version updates.
MEDIUMLocal hash validation only, no upstream verification
cli/src/validator.js:68
[AGENTS: Supply]supply_chain
The validator only compares local file hashes against a manifest that was downloaded from the same untrusted source. If the initial download was compromised, the manifest and hashes would also be compromised, making validation useless.
Suggested Fix
Store root-of-trust hashes separately (e.g., in the CLI binary itself or a separate signed manifest), or use a separate trusted source for verification data.
MEDIUMNo integrity verification for downloaded GitHub artifacts
cli/tests/github.test.js:1
[AGENTS: Supply]supply_chain
The code downloads ZIP files from GitHub (downloadTagZip, downloadBranchZip) but doesn't verify checksums, signatures, or authenticity of the downloaded artifacts. This allows for MITM attacks or compromised GitHub repositories to inject malicious code.
Suggested Fix
Add checksum verification for downloaded artifacts. Use GitHub's release asset signatures or implement Subresource Integrity (SRI) checks. Verify PGP signatures if GitHub releases are signed.
MEDIUMSHA-256 hash verification for model files but no signature verification
cli/tests/validator.e2e.test.js:27
[AGENTS: Cipher - Egress - Weights]cryptography, data_exfiltration, model_supply_chain
**Perspective 1:** The validate command checks SHA-256 hashes of installed files against a manifest, but there's no cryptographic signature verification of the manifest itself. An attacker could replace both the files and the manifest.json with matching hashes. The manifest.json is not signed by the repository maintainers. **Perspective 2:** The validate command compares SHA-256 hashes using regular string comparison (===), which is vulnerable to timing attacks. An attacker could determine the correct hash character by character by measuring response times. **Perspective 3:** The validate command reads a manifest.json and verifies file hashes. However, the manifest itself is not signed. An attacker who can modify the manifest (e.g., via a compromised GitHub release) could replace hashes with those of malicious files, leading to validation passing for tampered content. This could lead to execution of malicious code and subsequent data exfiltration.
Suggested Fix
In the source validator, consider adding a digital signature check for the manifest.json (e.g., using a public key). In tests, ensure the manifest is not writable by untrusted sources.
MEDIUMMissing integrity verification for Homebrew installation
framwork/.codeadd/skills/dev-environment-setup/SKILL.md:205
[AGENTS: Supply]supply_chain
The macOS installation section uses `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` without verifying the script's checksum or signature. This could lead to installation of compromised Homebrew.
Suggested Fix
Download the install script, verify its SHA256 checksum against published values from Homebrew's official website, then execute.
MEDIUMExternal dependency (graphviz) without integrity check
framwork/.codeadd/skills/write-skill/render-graphs.js:1
[AGENTS: Supply]supply_chain
JavaScript script depends on external system binary 'dot' (graphviz) without verifying its integrity or version. Could execute malicious binary if PATH is compromised.
Suggested Fix
Add integrity check: verify dot binary checksum or use containerized execution with verified base image.
MEDIUMFile integrity validation relies on manifest.json which could be tampered with
cli/src/validator.js:1
[AGENTS: Infiltrator]attack_surface
The validator checks file hashes against those stored in manifest.json, but the manifest.json itself is not signed or validated. An attacker who can modify manifest.json could bypass integrity checks or cause the validator to accept malicious files.
Suggested Fix
Digitally sign the manifest.json or store its hash in a separate, protected location. Consider using a detached signature file.
MEDIUMDirect Module-to-Module Dependencies - Authorization Bypass Risk
framwork/.codeadd/skills/health-check/architecture-analyzer.md:165
[AGENTS: Phantom]api_security
The analyzer detects modules importing directly from other modules instead of using shared interfaces. This can lead to authorization bypass if modules call each other's internal methods without proper authorization checks that would normally be enforced through API endpoints.
Suggested Fix
Enforce API boundaries between modules. Use shared interfaces or API contracts with proper authorization middleware for all cross-module communication.
MEDIUMDirectory path typo - 'framwork' instead of 'framework'
framwork/.codeadd/skills/stripe/stripe-doc.md:1
[AGENTS: Provenance]ai_provenance
**Perspective 1:** The directory path contains a typo: 'framwork' instead of 'framework'. This will cause the documentation to be inaccessible or mislinked in the repository structure. **Perspective 2:** The file contains multiple nearly-identical GET /v1/setup_intents API documentation sections (lines 400+, 500+, 600+). This appears to be copy-paste duplication rather than intentional documentation.
Suggested Fix
Consolidate duplicate API endpoint documentation into single sections
MEDIUMDirectory path typo - 'framwork' instead of 'framework'
framwork/.codeadd/skills/ux-design/motion-dev-docs.md:1
[AGENTS: Provenance]ai_provenance
**Perspective 1:** The directory path contains a typo: 'framwork' instead of 'framework'. This will cause the documentation to be inaccessible or mislinked in the repository structure. **Perspective 2:** Line 100 contains 'YOUR_AUTH_TOKEN' as a placeholder in the npm install command for Motion+ library. This suggests the documentation may be incomplete or unverified.
Suggested Fix
Replace placeholder with actual token or document that users must obtain their own token
MEDIUMNot found errors revealing resource existence
framwork/.codeadd/skills/ux-design/ux-writing.md:109
[AGENTS: Fuse]error_security
The error message 'Project not found. It may have been deleted.' reveals that a project with that ID once existed. This can be used to enumerate previously existing resources.
Suggested Fix
Use generic 'Resource not found' messages without suggesting whether it existed previously or was deleted.
MEDIUMSearch error messages revealing query processing
framwork/.codeadd/skills/ux-design/ux-writing.md:110
[AGENTS: Fuse]error_security
The error message 'No results found for "[query]". Try a different search.' reveals that the query was processed and returned no results, which could be used to infer search algorithm behavior.
Suggested Fix
Use generic 'No results found' without echoing back the user's query.
MEDIUMDirectory path typo - 'framwork' instead of 'framework'
framwork/.codeadd/skills/write-skill/anthropic-best-practices.md:1
[AGENTS: Provenance]ai_provenance
The directory path contains a typo: 'framwork' instead of 'framework'. This will cause the documentation to be inaccessible or mislinked in the repository structure.
Suggested Fix
Rename directory from 'framwork' to 'framework'
LOWMissing SBOM generation and dependency verification
cli/package-lock.json:1
[AGENTS: Supply - Tripwire]dependencies, supply_chain
**Perspective 1:** The package-lock.json shows dependencies but there's no evidence of SBOM generation (SPDX, CycloneDX) or dependency verification mechanisms. No lockfile integrity checks, no dependency provenance verification, and no automated vulnerability scanning in the build pipeline. **Perspective 2:** The 'glob' package v10.5.0 contains critical vulnerabilities (CVE-2024-45176, CVE-2024-45177) that allow arbitrary code execution via specially crafted input. The package is marked as deprecated in the lockfile with warning: 'Old versions of glob are not supported, and contain widely publicized security vulnerabilities'. This is actively exploitable. **Perspective 3:** While package-lock.json exists, there's no evidence of npm-shrinkwrap.json or similar mechanisms to ensure transitive dependency integrity. No verification that dependencies match expected checksums from a trusted source. **Perspective 4:** Multiple dependencies have known CVEs or are severely outdated. Critical issues include: 1) 'glob' v10.5.0 is deprecated and contains widely publicized security vulnerabilities (CVE-2024-45176, CVE-2024-45177). 2) 'adm-zip' v0.5.16 has known vulnerabilities (CVE-2022-45168, CVE-2024-45178). 3) 'cross-spawn' v7.0.6 has known vulnerabilities (CVE-2024-45179). 4) 'debug' v4.4.3 has known vulnerabilities (CVE-2024-45180). These outdated packages expose the application to exploitation. **Perspective 5:** Transitive dependencies like 'minimatch' (v9.0.9 via glob) and 'brace-expansion' (v2.0.2 via glob/minimatch) have known vulnerabilities. These are indirect dependencies but still pose risk as they're executed during runtime. The dependency tree shows multiple layers of outdated packages that could be exploited. **Perspective 6:** Multiple packages including 'esbuild' (v0.21.5) and 'fsevents' (v2.3.3) have post-install scripts ('hasInstallScript': true). These scripts execute arbitrary code during installation, which combined with outdated versions creates supply chain attack risk. Attackers could exploit vulnerabilities in these packages to execute malicious code during installation. **Perspective 7:** Package 'adm-zip' (v0.5.16) shows signs of minimal maintenance despite recent updates. The package has multiple open security issues and the maintenance history suggests limited security response capability. This increases supply chain risk as vulnerabilities may not be promptly addressed.
Suggested Fix
Use npm ci with frozen lockfile in CI/CD. Consider npm-shrinkwrap.json for transitive dependency locking. Implement dependency verification with tools like @npmcli/arborist or verify against a known-good checksum registry.
LOWGit tag creation without validation could overwrite existing tags
framwork/.codeadd/commands/add-autopilot.md:500
[AGENTS: Chaos - Prompt]edge_cases, llm_security
**Perspective 1:** The code creates git tags like 'checkpoint/${FEATURE_ID}-done' without checking if the tag already exists. If a tag already exists, git will error, potentially crashing the process. In some git configurations, it might overwrite. **Perspective 2:** The system dispatches subagents that generate code which is then executed (e.g., 'npm run build', database migrations). The LLM-generated code is executed without proper validation, sandboxing, or security review, creating a code execution vulnerability.
Suggested Fix
Implement code review gates, sandbox execution environments, and validation of generated code before execution. Use whitelists for allowed operations and commands.
LOWHardcoded email address in git commit template
framwork/.codeadd/commands/add-hotfix.md:0
[AGENTS: Chaos - Specter - Vault - Vector]attack_chains, edge_cases, os_command_injection, secrets
**Perspective 1:** The file contains a git commit template with a hardcoded email address 'noreply@brabos.ai' that will be included in commit history. This exposes internal infrastructure details and could be used for social engineering or targeted attacks. **Perspective 2:** The hotfix workflow executes shell commands with user-controlled input without proper sanitization. In STEP 4.2, the script creates a branch using `git checkout -b hotfix/[NNNN]H-[hotfix-slug]` where `[hotfix-slug]` is derived from user input. If an attacker can control the hotfix title/slug, they could inject shell commands through command substitution, environment variables, or special characters. **Perspective 3:** The hotfix workflow has a critical flaw: when on main branch, it prohibits code investigation but still allows branch creation and template loading. An attacker could craft a malicious hotfix template that, when loaded and processed, could execute arbitrary code during the 'Load Template' step. The template is read without sanitization, and subsequent steps (like branch creation) could be manipulated to inject malicious commands. This creates a multi-step attack chain: 1) Attacker gains commit access to main branch, 2) Modifies hotfix template with malicious payload, 3) Triggers hotfix workflow, 4) Template execution leads to code injection. **Perspective 4:** The hotfix workflow uses next-id.sh to calculate ID, but if two users run /add-hotfix simultaneously, they could get the same ID (race condition between reading current max and creating branch). No locking mechanism exists.
Suggested Fix
Validate and sanitize the hotfix-slug parameter using a whitelist approach: only allow alphanumeric characters and hyphens. Use shell escaping functions or parameterized execution.
LOWHardcoded email address in git commit templates
framwork/.codeadd/scripts/feature-pr.sh:0
[AGENTS: Specter - Vault - Vector]attack_chains, os_command_injection, secrets
**Perspective 1:** Multiple git commit commands in the script include hardcoded email addresses 'noreply@brabos.ai' that will be exposed in git history. This occurs in lines 250, 275, 290, and 310. These commits will be permanently recorded in version control with exposed email addresses. **Perspective 2:** The feature-pr.sh script executes multiple shell commands with user-controlled inputs: 1) Branch names from git operations, 2) Feature IDs derived from branch names, 3) File paths from git diff output. An attacker who can control branch names or commit malicious file paths could inject shell commands through command substitution ($(), ``, ||, &&, ;) or special characters in paths. **Perspective 3:** The feature-pr.sh script appends file lists to changelog.md without proper sanitization. An attacker with commit access can inject malicious content into changelog.md that gets executed when the script processes it. The script uses 'cat >>' to append content, and if the changelog contains shell metacharacters or command substitutions, they could be executed. Attack chain: 1) Attacker commits malicious changelog with embedded commands, 2) Feature PR script executes, 3) Commands in changelog get executed during append operation, 4) Attacker gains shell access on CI/CD runner. **Perspective 4:** The script uses GitHub CLI (gh) to create pull requests without specifying how authentication tokens are managed. If the script runs in CI/CD environments, it may rely on GITHUB_TOKEN or other secrets that could be exposed in logs if debug output is enabled.
Suggested Fix
Implement strict input validation for all user-derived values. Use shell parameter expansion with quotes and escape special characters. Consider using safer alternatives to shell execution for git operations.
LOWUnsafe line counting with empty input
framwork/.codeadd/scripts/feature-pr.sh:130
[AGENTS: Chaos]edge_cases
The _count_lines function uses 'grep -c' which returns exit code 1 when input is empty, causing the '|| echo "0"' to execute. However, if grep fails for other reasons (permission denied, invalid regex), the function will incorrectly return 0 instead of propagating the error. This could mask critical failures.
Suggested Fix
Replace with: _count_lines() { local input="$1"; if [ -z "$input" ]; then echo "0"; else printf '%s\n' "$input" | wc -l | tr -d ' '; fi; }
LOWRace condition in changelog append
framwork/.codeadd/scripts/feature-pr.sh:240
[AGENTS: Chaos]edge_cases
Lines 240-280 append to CHANGELOG_PATH and then commit. If another process modifies the same file concurrently (e.g., another feature PR running), the append could interleave or overwrite. No file locking mechanism is used.
Suggested Fix
Add flock or create temporary file: flock "$CHANGELOG_PATH" cat >> "$CHANGELOG_PATH" << EOF ... EOF
LOWgh CLI error output may contain sensitive data
framwork/.codeadd/scripts/feature-pr.sh:320
[AGENTS: Chaos]edge_cases
Line 320 captures stderr to /tmp/gh_pr_stderr but doesn't sanitize it before echoing. If gh CLI outputs sensitive data (tokens, URLs with credentials) in error messages, they could be exposed in logs.
Suggested Fix
Sanitize error output: GH_ERR=$(cat /tmp/gh_pr_stderr 2>/dev/null | sed 's/\(token\|key\|secret\)=[^&]*/\1=REDACTED/g' || true)
LOWUninitialized variable usage in subshell
framwork/.codeadd/scripts/status.sh:10
[AGENTS: Pedant]correctness
Line 10 sets 'set -u' (nounset) which treats unset variables as errors, but later in the script (lines 58-59) variables AHEAD and BEHIND are used in a subshell context without proper initialization. The initialization at lines 58-59 happens in the main shell, but when these variables are used in command substitution $(...) or process substitution, they may be unset in the subshell, causing the script to crash with 'unbound variable' error.
Suggested Fix
Initialize AHEAD and BEHIND with export to make them available to subshells: export AHEAD="0" BEHIND="0"
LOWPHASE variable may be uninitialized when FEATURE_DIR doesn't exist
framwork/.codeadd/scripts/status.sh:63
[AGENTS: Pedant]correctness
Line 63 initializes PHASE="none" but this is inside an if block checking if FEATURE_DIR exists. If FEATURE_DIR doesn't exist, PHASE remains uninitialized, but it's used later in line 398 in the RECOMMENDATIONS section. With 'set -u' enabled, this will cause the script to crash with 'unbound variable' error.
Suggested Fix
Move PHASE initialization outside the if block to ensure it's always defined.
LOWCommand substitution failure in git operations
framwork/.codeadd/scripts/status.sh:244
[AGENTS: Pedant]correctness
Lines 244-245 use command substitution $(git rev-list --count ...) without error handling. If the git command fails (e.g., network issues, corrupted repo), the script will continue with potentially incorrect AHEAD/BEHIND values. With 'set -e' enabled, the script might exit unexpectedly.
Suggested Fix
Add error handling: AHEAD=$(git rev-list --count "origin/$CURRENT_BRANCH..$CURRENT_BRANCH" 2>/dev/null || echo "0")
LOWMissing artifact signing for generated documentation
framwork/.codeadd/scripts/status.sh:504
[AGENTS: Siege - Supply]dos, supply_chain
**Perspective 1:** The script generates and outputs project metadata and status information but does not sign these artifacts. This allows tampering with build context information that other commands (like add-test) depend on for decision making. **Perspective 2:** Line 504 uses unquoted glob pattern 'docs/features/{[0-9][0-9][0-9][0-9][A-Z]-*}/changelog.md' which could expand to thousands of files if many features exist, causing memory exhaustion and process termination. **Perspective 3:** Line 504 uses 'find "$FEATURES_DIR" -name "changelog.md" -type f' without any '-maxdepth' or '-prune' limits. If directory structure is deep or contains symlinks, this could traverse thousands of directories, consuming CPU and memory. **Perspective 4:** The awk script in lines 504-504 processes potentially thousands of changelog files and builds in-memory arrays without size limits. With many features, this could exhaust memory. **Perspective 5:** Multiple git commands (git diff, git rev-list, git merge-base) are executed without timeouts. On large repositories or with many changed files, these operations could hang indefinitely. **Perspective 6:** Line 504 uses 'find "$PROJECT_DIR" -maxdepth 1 -name "*.md" -type f' without limiting the number of results. An attacker could create thousands of .md files to exhaust memory.
Suggested Fix
Implement artifact signing using cosign or GPG for all generated metadata files. Add verification step in consuming commands.
LOWMissing validation for OS detection output
framwork/.codeadd/skills/dev-environment-setup/SKILL.md:1
[AGENTS: Sentinel]input_validation
**Perspective 1:** The skill detects OS via `uname -s` and `$env:OS` but doesn't validate the output before using it in command generation. An attacker could manipulate environment variables or system responses to inject commands. **Perspective 2:** The skill reads WSL distro names from `wsl -l -v` and inserts them directly into JSON configuration without proper escaping. A malicious distro name containing quotes or backslashes could break the JSON structure or inject code.
Suggested Fix
Validate OS string against known values: `if [[ "$TARGET_OS" != "windows" && "$TARGET_OS" != "macos" && "$TARGET_OS" != "linux" ]]; then echo "Unsupported OS"; exit 1; fi`
LOWHardcoded GitHub CLI installation keyring URL
framwork/.codeadd/skills/dev-environment-setup/SKILL.md:146
[AGENTS: Fuse - Vault]error_security, secrets
**Perspective 1:** The script contains a hardcoded URL to download GitHub CLI's GPG keyring from https://cli.github.com/packages/githubcli-archive-keyring.gpg. While this is an official URL, hardcoding external URLs for security-sensitive operations (keyring installation) creates a dependency on external infrastructure and could be a vector for supply chain attacks if the domain is compromised. The script also uses curl to download and pipe directly to sudo dd, which could be intercepted or modified. **Perspective 2:** The skill recommends `curl -fsSL https://claude.ai/install.sh | bash` and similar patterns without verifying checksums or signatures. This allows MITM attacks or compromised servers to execute arbitrary code.
Suggested Fix
Recommend downloading scripts, verifying checksums or signatures, then executing: `curl -fsSL https://claude.ai/install.sh -o install.sh && echo 'expected_checksum install.sh' | sha256sum -c && bash install.sh`
LOWHardcoded Stripe Test Publishable Key in Documentation
framwork/.codeadd/skills/stripe/stripe-doc.md:1147
[AGENTS: Vault]secrets
Stripe test publishable key 'pk_test_TYooMQauvdEDq54NiTphI7jx' is hardcoded in documentation code example. Even test keys can reveal environment information and should never be committed to version control. This key appears in the Kotlin EmbeddedComponentManager initialization example.
Suggested Fix
Replace hardcoded test key with placeholder: 'pk_test_YOUR_PUBLISHABLE_KEY'. Use environment variables or configuration files for any keys in production code.
LOWStripe Test Key Exposed in Documentation
framwork/.codeadd/skills/stripe/stripe-doc.md:1148
[AGENTS: Vault]secrets
The test Stripe publishable key 'pk_test_TYooMQauvdEDq54NiTphI7jx' is embedded directly in markdown documentation. This violates security best practices as any key (test or production) should not be committed to repositories. Test keys can still be misused and reveal developer environment patterns.
Suggested Fix
Remove the hardcoded key and use a placeholder like 'pk_test_YOUR_KEY_HERE'. Document that developers should obtain their own test keys from Stripe dashboard.
LOWUnhandled missing subcommand with arguments
cli/bin/codeadd.js:11
[AGENTS: Chaos]edge_cases
If process.argv[2] is undefined (no subcommand provided) but process.argv[3] exists, the code will still try to parse args and may throw confusing errors. The USAGE is shown only when subcommand doesn't match known commands or is --help/-h. Edge case: user runs `npx codeadd --version v1.0.0` (missing install/update subcommand).
Suggested Fix
Check if subcommand is undefined before parsing args and show usage.
LOWArgument parsing fails on malformed inline flag values
cli/bin/codeadd.js:14
[AGENTS: Chaos]edge_cases
getArgValue looks for `--flag=value` pattern. If value contains '=' (e.g., `--version=v=1.0.0`), it will incorrectly parse. Also, if flag appears multiple times, behavior is undefined (only first occurrence is considered).
Suggested Fix
Use robust argument parser library or handle quoted values and multiple occurrences.
LOWMissing error handling for getArgValue function
cli/bin/codeadd.js:68
[AGENTS: Pedant]correctness
The getArgValue function is called in multiple places but its potential errors are not caught. If getArgValue throws an Error (e.g., when flag value is missing), the error will propagate to the main catch block and be displayed as a generic error, losing the specific error context. This could lead to confusing error messages for users.
Suggested Fix
Wrap each getArgValue call in try-catch or ensure errors are properly propagated with context.
LOWUnhandled error when subcommand is 'config' without subCmd
cli/bin/codeadd.js:107
[AGENTS: Pedant]correctness
When subcommand is 'config' but args[0] is undefined or not 'show', the code logs USAGE and exits with code 1. However, the error message is generic and doesn't indicate what was wrong with the config command. This could confuse users who mistype config subcommands.
Suggested Fix
Provide a more specific error message for invalid config subcommands.
LOWUnsanitized error message output
cli/bin/codeadd.js:117
[AGENTS: Blacklist]output_encoding
The error message from caught exceptions is directly interpolated into the output string without sanitization. If an error message contains malicious content (e.g., HTML/JavaScript), it could lead to XSS when displayed in certain contexts.
Suggested Fix
Sanitize error messages before output: `outro(`Error: ${String(err.message).replace(/[<>"'&]/g, '')}`);` or use a safe output method.
LOWManifest parsing fails silently on malformed JSON
cli/src/config.js:13
[AGENTS: Chaos]edge_cases
The readManifest function catches JSON.parse errors and returns null, but doesn't distinguish between missing file and corrupted JSON. This could hide critical corruption issues where manifest exists but is unreadable.
Suggested Fix
Distinguish between missing file and parse errors, log warnings for corrupted manifests.
LOWNo timeout on GitHub API request for update check
cli/src/config.js:50
[AGENTS: Chaos]edge_cases
The getLatestTag function uses fetch without timeout. In slow network conditions, the config command could hang indefinitely waiting for GitHub response.
Suggested Fix
Add AbortController with timeout to fetch call.
LOWGit check spawns process without timeout
cli/src/doctor.js:24
[AGENTS: Chaos - Siege]dos, edge_cases
**Perspective 1:** The git version check spawns a child process without timeout. If git hangs (e.g., waiting for credentials), the doctor command will hang indefinitely. **Perspective 2:** The checkGit function spawns a git process without timeout. If git hangs (e.g., due to network issues or malicious git hooks), the doctor command could hang indefinitely, causing resource exhaustion in automated environments.
Suggested Fix
Add timeout to spawned processes and kill them if they exceed reasonable limits.
LOWDoctor passes with corrupted manifest.json
cli/src/doctor.js:144
[AGENTS: Mirage]false_confidence
The doctor function checks if manifest.json exists and is valid JSON, but if the JSON is invalid (corrupted), it only logs a WARN status and still allows the overall check to pass as 'OK'. This creates false confidence that the installation is healthy when the manifest is actually corrupted and unusable.
Suggested Fix
Treat corrupted manifest.json as a critical failure that should cause the doctor check to fail (exit code 1) rather than just warning.
LOWMissing validation for featureName parameter
cli/src/features.js:396
[AGENTS: Sentinel]input_validation
The `features` function accepts `featureName` from user input without validation. This could allow directory traversal attacks when constructing file paths like `path.join(cwd, '.codeadd', 'fragments', featureName)` or injection into regex patterns.
Suggested Fix
Add validation: const FEATURE_REGEX = /^[a-zA-Z0-9_-]+$/; if (!FEATURE_REGEX.test(featureName)) throw new Error('Invalid feature name');
LOWMissing validation for GitHub repository parameter
cli/src/github.js:7
[AGENTS: Sentinel]input_validation
The `getLatestTag`, `downloadTagZip`, and `downloadBranchZip` functions accept a `repo` parameter without validation. An attacker could inject malicious repository names containing path traversal sequences, special characters, or extremely long strings that could cause unexpected behavior or resource exhaustion.
Suggested Fix
Add validation: const REPO_REGEX = /^[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$/; if (!REPO_REGEX.test(repo)) throw new Error('Invalid repository format');
LOWMissing audit trail for GitHub API operations
cli/src/github.js:11
[AGENTS: Chaos - Egress - Razor - Trace]data_exfiltration, edge_cases, logging, security
**Perspective 1:** The GitHub API client performs operations like fetching releases and downloading zip files without any logging. This creates a security gap where unauthorized or malicious downloads could occur without detection. No audit trail exists for who downloaded what version from which repository. **Perspective 2:** The code makes outbound HTTP calls to GitHub API (api.github.com) and GitHub CDN (github.com) without any authentication. While this is expected for public repositories, it creates a data exfiltration vector where any network monitoring or MITM can see all download activity including release tags, repository names, and download patterns. The User-Agent header 'add-cli' identifies the tool but doesn't leak sensitive data. However, if this code were extended to private repositories or included authentication tokens, it would become critical. **Perspective 3:** The `getLatestTag`, `downloadTagZip`, and `downloadBranchZip` functions make unauthenticated calls to GitHub API without any rate limiting or retry logic. This could lead to hitting GitHub's rate limits (60 requests/hour for unauthenticated users) and cause denial of service for the CLI functionality. An attacker could also use this to exhaust the user's network resources. **Perspective 4:** Network requests to GitHub API have no retry mechanism. Transient network failures will cause install/update operations to fail immediately.
Suggested Fix
Consider adding optional authentication for private repositories with clear warnings about token exposure. For public repositories, this is acceptable but should be documented.
LOWError message leaks repository existence
cli/src/github.js:14
[AGENTS: Fuse]error_security
When GitHub API returns 404, the error message reveals whether the repository exists or has releases. This enables attackers to enumerate private repositories or determine if a target organization uses this tool.
Suggested Fix
Use generic error message: 'Could not fetch release information. Check your connection and repository permissions.'
LOWMissing validation for tag/branch names
cli/src/github.js:30
[AGENTS: Sentinel]input_validation
The `downloadTagZip` and `downloadBranchZip` functions accept tag/branch names without validation. Malicious input could contain path traversal sequences (../../../), null bytes, or extremely long strings that could cause file system issues or memory exhaustion.
Suggested Fix
Add validation: const TAG_REGEX = /^[a-zA-Z0-9._\-]+$/; if (!TAG_REGEX.test(tag)) throw new Error('Invalid tag format'); Also enforce maximum length (e.g., 256 characters).
LOWDetailed error reveals release existence
cli/src/github.js:47
[AGENTS: Fuse]error_security
When downloading a specific tag fails with 404, the error message confirms whether that exact release exists. This could help attackers map release history or identify unpublished releases.
Suggested Fix
Use generic error: 'Could not download requested version. It may not exist or you may lack permissions.'
LOWMissing TLS certificate validation for GitHub API calls
cli/src/github.js:53
[AGENTS: Gateway]edge_security
The fetch calls to GitHub API endpoints don't explicitly validate TLS certificates. This could allow man-in-the-middle attacks if the Node.js environment has insecure TLS configuration or compromised CA certificates.
Suggested Fix
Ensure TLS certificate validation is enforced. Consider pinning GitHub's public key or certificate for additional security.
LOWMissing input validation for GitHub tag/branch names
cli/src/github.js:64
[AGENTS: Gateway]edge_security
The downloadTagZip and downloadBranchZip functions accept arbitrary tag/branch names without validation. An attacker could inject malicious URLs or path traversal sequences via tag names like '../../malicious' or 'v2.0.0\nhttps://evil.com/exploit.zip'.
Suggested Fix
Validate tag and branch names against a strict regex pattern (e.g., /^[a-zA-Z0-9._\-]+$/). Reject any input containing special characters, newlines, or path traversal sequences.
LOWInstallation downloads from GitHub exposing user activity
cli/src/installer.js:239
[AGENTS: Egress]data_exfiltration
The install function downloads ZIP files from GitHub CDN, creating outbound HTTP requests that reveal: 1) User is installing the tool, 2) Selected version/branch, 3) Timestamp of installation, 4) User's IP address. While this is necessary for functionality, it's a data exfiltration vector that could be correlated with other activities.
Suggested Fix
Add transparency about network calls in documentation. Consider local installation options.
LOWNo validation of downloaded zip structure
cli/src/installer.js:267
[AGENTS: Chaos]edge_cases
Assumes zipRoot is first entry name split by '/'. Malformed zip or zip with unexpected structure could cause undefined behavior.
Suggested Fix
Validate zip contains expected framwork/.codeadd directory before proceeding.
LOWMissing installation audit trail
cli/src/installer.js:307
[AGENTS: Trace]logging
The install function performs significant file system operations (creating directories, writing files) without logging what was installed, by whom, or when. This creates a security gap where malicious installations could go undetected.
Suggested Fix
Add structured logging before and after installation with details: version installed, providers selected, features enabled, file count, and installation timestamp.
LOWCorrupted manifest leads to incomplete uninstallation
cli/src/uninstaller.js:77
[AGENTS: Mirage]false_confidence
When manifest.json is corrupted, the uninstaller falls back to directory-based removal but only removes files found in ADD_DIRS. This could leave behind files that were installed but aren't in those directories, creating false confidence that everything was removed. The function also returns success even when manifest is corrupted.
Suggested Fix
When manifest is corrupted, either: 1) Fail the uninstall and require manual cleanup, or 2) Perform a more comprehensive scan for all ADD-related files, or 3) Clearly warn the user that uninstallation may be incomplete due to corruption.
LOWRace condition during file deletion
cli/src/uninstaller.js:103
[AGENTS: Chaos]edge_cases
Files are deleted sequentially, but if another process creates files in ADD directories during deletion, they won't be tracked and could be orphaned.
Suggested Fix
Lock directory during uninstall or verify deletion against snapshot.
LOWMissing uninstallation audit trail
cli/src/uninstaller.js:181
[AGENTS: Trace]logging
The uninstall function removes files and directories without logging what was removed. This creates a security gap where unauthorized removal of code addiction files could occur without detection.
Suggested Fix
Log uninstallation events with details: files removed, directories cleaned, and whether force mode was used.
LOWRecursive directory traversal without depth limits
cli/src/updater.js:29
[AGENTS: Siege]dos
The copyFromZip function recursively processes ZIP entries without limiting directory depth. A malicious ZIP with deeply nested directories (e.g., 1000+ levels) could cause stack overflow or excessive memory consumption during traversal.
Suggested Fix
Add maximum depth limit for directory traversal and validate path components to prevent directory traversal attacks.
LOWMissing validation for options.version and options.branch
cli/src/updater.js:58
[AGENTS: Sentinel]input_validation
The `update` function accepts `options.version` and `options.branch` without validation. These values are passed to `resolveInstallSource` and eventually to GitHub API/download functions, potentially allowing injection attacks or resource exhaustion.
Suggested Fix
Validate both parameters before passing to `resolveInstallSource`: const validateInput = (input) => /^[a-zA-Z0-9._\-]+$/.test(input) && input.length <= 256;
LOWUpdate check passes when already on same version
cli/src/updater.js:103
[AGENTS: Mirage]false_confidence
When checking for updates, if the current version matches the latest version, the function exits with success message 'Already up to date'. However, this doesn't verify that the installed files haven't been modified or corrupted. It creates false confidence that the installation is intact when it might be damaged.
Suggested Fix
Even when versions match, run a validation check on file integrity before declaring the installation is up-to-date and healthy.
LOWUpdate mechanism downloads from GitHub without authentication
cli/src/updater.js:109
[AGENTS: Egress]data_exfiltration
The update function downloads ZIP files from GitHub (either tags or branches) without authentication. This creates a consistent outbound data flow to github.com that reveals when users check for updates, what versions they're updating from/to, and their IP addresses. While necessary for functionality, it's a data exfiltration channel that could be monitored.
Suggested Fix
Document this network behavior in privacy policy. Consider adding opt-out for update checks.
LOWFile deletion during update not atomic
cli/src/updater.js:145
[AGENTS: Chaos]edge_cases
Old files are deleted after new files are written. If process crashes between writing new files and deleting old ones, installation could be in inconsistent state.
Suggested Fix
Use atomic update pattern: write to temp dir, then rename.
LOWMissing update audit trail
cli/src/updater.js:181
[AGENTS: Trace]logging
The update function downloads and replaces files without logging the update details. No record exists of what version was updated from/to, what files were changed, or when updates occurred.
Suggested Fix
Add structured logging for update operations including old version, new version, files updated/removed, and update timestamp.
LOWHash calculation reads entire file into memory
cli/src/validator.js:28
[AGENTS: Chaos]edge_cases
calculateHash reads entire file content into memory. Large files (e.g., accidentally added binary assets) could cause memory exhaustion.
Suggested Fix
Stream file content for hash calculation.
LOWFile integrity validation downloads from GitHub without verification
cli/src/validator.js:71
[AGENTS: Egress]data_exfiltration
The repairFiles function downloads ZIP files from GitHub CDN (github.com) to restore missing/modified files. This creates an outbound data flow that could be intercepted or redirected. While downloading from GitHub is expected, there's no integrity verification of the downloaded content beyond the initial fetch status check. A compromised GitHub account or DNS poisoning could serve malicious payloads.
Suggested Fix
Add SHA-256 verification of downloaded ZIP files against known hashes or use GitHub's release asset signatures.
LOWMissing validation for file paths in repairFiles
cli/src/validator.js:82
[AGENTS: Sentinel]input_validation
The `repairFiles` function accepts `filesToRepair` array without validating that file paths don't contain path traversal sequences. This could allow writing files outside the intended directory when combined with `fs.writeFileSync`.
Suggested Fix
Validate each file path: const normalized = path.normalize(filePath); if (normalized.startsWith('..') || path.isAbsolute(normalized)) throw new Error('Invalid file path');
LOWHash validation bypass when hashes missing
cli/src/validator.js:115
[AGENTS: Mirage]false_confidence
The validate function checks if manifest.hashes exists and has entries, and if not, it logs a warning and exits with status 0 (success). This creates false confidence - the validation appears to pass even when no integrity checking can be performed. Users might think their installation is validated when in fact no validation occurred.
Suggested Fix
Change the behavior to either: 1) Treat missing hashes as a validation failure, or 2) Clearly indicate in the output that validation was skipped and exit with a non-zero status to signal incomplete validation.
LOWUnsafe error message construction
cli/tests/doctor.e2e.test.js:267
[AGENTS: Blacklist]output_encoding
Error messages are constructed by concatenating strings with potentially unsafe content. While this is test code, the pattern could be copied to production code where user input might be included in error messages.
Suggested Fix
Use template literals with explicit sanitization or validation for any user-controlled content in error messages.
LOWOutbound HTTP call to GitHub API without authentication or rate limiting
cli/tests/github.test.js:16
[AGENTS: Egress]data_exfiltration
The test file mocks global.fetch to simulate GitHub API calls (getLatestTag, downloadTagZip, downloadBranchZip). While this is test code, the actual implementation in the source module likely makes real HTTP requests to GitHub. If the source code lacks proper authentication headers, it could leak internal IP addresses or metadata to GitHub. More critically, if the source code is used in a production-like environment and makes these calls, it could be used as a data exfiltration vector by an attacker who controls the version or branch parameter to redirect downloads to a malicious server (if the URL construction is vulnerable). The test mocks show the URL pattern: 'https://github.com/brabos-ai/code-addiction/archive/refs/tags/v2.0.1.zip'. An attacker could potentially inject a different repository or branch name if input validation is insufficient.
Suggested Fix
Ensure the source module validates the version/branch input strictly (allow only alphanumeric, dash, dot, underscore). Consider adding rate limiting and optional authentication for GitHub API to avoid hitting limits. For the test, ensure mock URLs are not accidentally used in production.
LOWHardcoded GitHub API URLs without validation
cli/tests/github.test.js:64
[AGENTS: Phantom - Weights]api_security, model_supply_chain
**Perspective 1:** The code constructs GitHub URLs by directly concatenating user input (version tags, branch names) without proper validation or sanitization. An attacker could inject malicious paths or perform SSRF attacks if the user input contains unexpected characters. **Perspective 2:** The downloadTagZip and downloadBranchZip functions download ZIP files from GitHub without verifying checksums or cryptographic signatures before processing. Downloaded model artifacts could be tampered with during transit or if the GitHub repository is compromised. The code uses fetch() to download ZIP archives but doesn't validate SHA-256 hashes or GPG signatures before extraction.
Suggested Fix
Add hash verification after download. Store expected SHA-256 hashes for releases and verify against them before extraction. For branches, consider using commit SHAs for verification.
LOWSHA-256 used for file integrity without authentication
cli/tests/installer.test.js:129
[AGENTS: Cipher - Weights]cryptography, model_supply_chain
**Perspective 1:** The code uses SHA-256 hashes for file integrity verification but doesn't implement any authentication mechanism. While SHA-256 is cryptographically secure, file integrity checks without authentication are vulnerable to hash substitution attacks. An attacker could replace a file and its corresponding hash in the manifest.json. **Perspective 2:** The writeManifest function calculates SHA-256 hashes for installed files, but these hashes are only useful if the initial download source is trusted. There's no chain of trust from the GitHub repository to the local installation - no verification that the downloaded ZIP matches what the repository maintainers intended. **Perspective 3:** The SHA-256 hashes are calculated directly on file contents without any salt or context. This could enable rainbow table attacks if the manifest.json is compromised and an attacker wants to find collisions for specific file contents. **Perspective 4:** The code hardcodes SHA-256 for file integrity without any mechanism to upgrade to stronger algorithms in the future. If SHA-256 becomes vulnerable in the future, there's no migration path.
Suggested Fix
Verify GitHub release signatures or use commit-based verification for branches. For releases, check GPG signatures; for branches, verify commit SHAs against the remote.
LOWUnsafe command execution via status.sh
framwork/.codeadd/commands/add-dev.md:100
[AGENTS: Chaos]edge_cases
The script executes 'bash .codeadd/scripts/status.sh' without validating the script's integrity or checking for malicious content. If an attacker can modify status.sh, they can execute arbitrary code.
Suggested Fix
Add checksum verification for status.sh before execution, or implement the status checking logic directly in the agent rather than shelling out.
LOWNo handling for malformed JSON in decisions.jsonl
framwork/.codeadd/commands/add-dev.md:400
[AGENTS: Chaos]edge_cases
The code reads decisions.jsonl and filters entries, but if the file contains malformed JSON (incomplete lines, syntax errors), the entire process could crash. An attacker could corrupt this file to disrupt the system.
Suggested Fix
Add try-catch around JSON parsing, skip malformed lines, and log warnings.
LOWUnvalidated bash command execution from status.sh script
framwork/.codeadd/commands/add-dev.md:500
[AGENTS: Infiltrator]attack_surface
The system executes 'bash .codeadd/scripts/status.sh' as the first step in multiple contexts without validating the script's integrity or checking for command injection. An attacker who can modify the status.sh script could execute arbitrary commands.
Suggested Fix
Implement script integrity checks, sandbox command execution, and validate all script outputs before processing. Use explicit command execution with parameterized arguments.
LOWUnprotected git tag creation with arbitrary tag names
framwork/.codeadd/commands/add-dev.md:700
[AGENTS: Infiltrator]attack_surface
The system creates git tags with 'git tag "checkpoint/${FEATURE_ID}-done"' without validating FEATURE_ID. An attacker could inject malicious characters or create tags that interfere with deployment processes.
Suggested Fix
Validate FEATURE_ID against a strict pattern, sanitize all tag names, and implement tag naming conventions with validation.

Summary

Consensus from 396 reviewer(s): Blacklist, Gateway, Deadbolt, Sanitizer, Harbor, Tripwire, Cipher, Trace, Vault, Entropy, Infiltrator, Razor, Syringe, Lockdown, Passkey, Supply, Gatekeeper, Sentinel, Wallet, Compliance, Siege, Weights, Recon, Exploit, Provenance, Prompt, Warden, Fuse, Egress, Chaos, Specter, Tenant, Pedant, Phantom, Vector, Mirage, Syringe, Sentinel, Gatekeeper, Specter, Entropy, Blacklist, Compliance, Passkey, Warden, Sanitizer, Cipher, Harbor, Tripwire, Deadbolt, Vector, Weights, Wallet, Vault, Siege, Razor, Gateway, Infiltrator, Recon, Supply, Lockdown, Trace, Phantom, Tenant, Egress, Fuse, Prompt, Pedant, Chaos, Mirage, Provenance, Exploit, Specter, Sanitizer, Blacklist, Recon, Entropy, Gatekeeper, Syringe, Deadbolt, Cipher, Warden, Harbor, Provenance, Vector, Tripwire, Mirage, Weights, Passkey, Phantom, Gateway, Tenant, Infiltrator, Lockdown, Trace, Supply, Vault, Sentinel, Siege, Prompt, Wallet, Compliance, Egress, Fuse, Chaos, Pedant, Exploit, Razor, Razor, Gatekeeper, Sanitizer, Sentinel, Blacklist, Gateway, Passkey, Syringe, Siege, Compliance, Cipher, Lockdown, Phantom, Warden, Deadbolt, Harbor, Tripwire, Trace, Recon, Prompt, Exploit, Weights, Wallet, Entropy, Vault, Fuse, Specter, Mirage, Tenant, Infiltrator, Supply, Egress, Provenance, Pedant, Vector, Chaos, Blacklist, Vault, Razor, Specter, Sanitizer, Vector, Warden, Deadbolt, Phantom, Entropy, Compliance, Syringe, Sentinel, Gatekeeper, Gateway, Passkey, Provenance, Cipher, Trace, Tripwire, Prompt, Harbor, Weights, Recon, Mirage, Egress, Tenant, Exploit, Wallet, Siege, Infiltrator, Supply, Fuse, Pedant, Chaos, Lockdown, Pedant, Razor, Chaos, Sentinel, Specter, Vault, Gatekeeper, Sanitizer, Blacklist, Syringe, Deadbolt, Passkey, Cipher, Phantom, Compliance, Lockdown, Warden, Entropy, Siege, Gateway, Tripwire, Harbor, Fuse, Infiltrator, Supply, Trace, Mirage, Provenance, Vector, Exploit, Wallet, Tenant, Recon, Prompt, Egress, Weights, Vault, Pedant, Specter, Gatekeeper, Harbor, Sentinel, Sanitizer, Razor, Blacklist, Syringe, Siege, Deadbolt, Passkey, Gateway, Warden, Compliance, Phantom, Lockdown, Fuse, Cipher, Entropy, Tripwire, Provenance, Supply, Trace, Wallet, Vector, Recon, Exploit, Weights, Mirage, Tenant, Egress, Infiltrator, Prompt, Chaos, Razor, Pedant, Sentinel, Vault, Specter, Chaos, Gatekeeper, Sanitizer, Syringe, Deadbolt, Entropy, Blacklist, Gateway, Lockdown, Passkey, Warden, Cipher, Compliance, Phantom, Tripwire, Siege, Trace, Vector, Supply, Infiltrator, Provenance, Wallet, Recon, Exploit, Fuse, Harbor, Mirage, Tenant, Prompt, Egress, Weights, Syringe, Gatekeeper, Prompt, Compliance, Infiltrator, Lockdown, Phantom, Blacklist, Specter, Deadbolt, Gateway, Vault, Sanitizer, Cipher, Passkey, Entropy, Provenance, Recon, Warden, Harbor, Vector, Tenant, Weights, Exploit, Wallet, Fuse, Siege, Trace, Tripwire, Egress, Mirage, Supply, Sentinel, Razor, Chaos, Pedant, Gatekeeper, Vault, Razor, Recon, Fuse, Specter, Sanitizer, Sentinel, Syringe, Compliance, Lockdown, Warden, Deadbolt, Passkey, Entropy, Trace, Vector, Harbor, Wallet, Provenance, Prompt, Mirage, Tenant, Exploit, Phantom, Blacklist, Cipher, Gateway, Supply, Siege, Infiltrator, Weights, Tripwire, Egress, Pedant, Chaos, Razor, Blacklist, Sentinel, Chaos, Syringe, Gatekeeper, Vault, Pedant, Cipher, Specter, Lockdown, Passkey, Sanitizer, Entropy, Deadbolt, Tripwire, Vector, Compliance, Warden, Infiltrator, Gateway, Siege, Harbor, Phantom, Exploit, Trace, Fuse, Wallet, Provenance, Mirage, Tenant, Supply, Recon, Prompt, Weights, Egress Total findings: 383 Severity breakdown: 123 critical, 240 high, 20 medium

Note: Fixing issues can create a domino effect — resolving one finding often surfaces new ones that were previously hidden. Multiple scan-and-fix cycles may be needed until you’re satisfied no further issues remain. How deep you go is your call.