reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities
id: 02-02 phase: 02 plan: 02 type: execute wave: 2 depends_on: ["02-03"] requirements: [SEC-02, FIX-01] files_modified:
- modules/core.sh
- modules/web.sh
autonomous: true
must_haves:
truths:
- "D-04: Every variable expansion inside
sendToNotify()(modules/core.sh, ~lines 1387-1417) is double-quoted — bare$1/$NOTIFY_CONFIG/$discord_url/$slack_channel/$slack_authno longer appear in the function body" - "D-04: All curl
-Fform pairs use the quoted-form-pair pattern (-F \"key=value\",-F \"key=@${1}\") rather than bare-F key=valueor bare-F key=@${1}— quoting the entire-Fargument prevents word-splitting on filenames or values containing spaces" - "D-04: The Telegram URL interpolation
https://api.telegram.org/bot${telegram_key}/sendDocumentis fully double-quoted (\"https://api.telegram.org/bot${telegram_key}/sendDocument\") — the bare-URL form is gone" - "D-04: The four bare
$NOTIFY_CONFIGreferences at lines ~1399, ~1401, ~1402, ~1406, ~1408 (insidegrep -q ... $NOTIFY_CONFIGandsed -n ... ${NOTIFY_CONFIG}patterns) are all double-quoted as\"${NOTIFY_CONFIG}\"" - "D-05: After the quoting pass,
shellcheck -s bash modules/core.shproduces NO new SC2086 / SC2068 / SC2027 findings inside lines :1385-1420 vs the pre-pass baseline (any pre-existing findings outside this line range are not in scope)" - "D-05: If any intentional word-split survives (none expected), it is annotated with an inline
# shellcheck disable=SCXXXX # <reason>comment on the line ABOVE — NEVER a file-level disable (CONVENTIONS.md:277)" - "D-04: Existing
register_secret \"$telegram_key\"andregister_secret \"$discord_url\"calls remain functionally intact — these were already correctly quoted; stylistic normalisation to\"${telegram_key}\"/\"${discord_url}\"is allowed but optional" - "D-04: Function declaration form
function sendToNotify {(parentheses-less) is preserved verbatim — do NOT normalise it tofunction sendToNotify()as part of the quoting pass" - "D-06: modules/web.sh line 2340 is changed from
github.com/Brosck/mantra@latesttogithub.com/brosck/mantra@latest(1-characterB→blowercase fix)" - "D-06: After the fix,
grep -n 'Brosck' modules/web.shreturns 0 hits" - "FIX-01 traceability: the lowercase
brosckvalue matches the local install path established by commitf64383c2(install.shgotools[\"mantra\"]=\"github.com/brosck/mantra\") — the local and remote install paths agree" - "Plan 02-02 lands ON TOP of Plan 02-03's modules/web.sh edits (Wave 2 / depends_on 02-03). Line 2340 in modules/web.sh as of pre-Plan-02-03 is the
axiom-execline containingBrosck; after Plan 02-03 lands the surrounding axiom-scan line 2341 (the\"$AXIOM_EXTRA_ARGS\"site at PATTERNS.md table) becomes\"${AXIOM_EXTRA_ARGS_ARR[@]}\". Plan 02-02 then changes only theB→bon the axiom-exec line — independent of the axiom-scan change." - "bash -n passes on modules/core.sh and modules/web.sh after both edits" artifacts:
- path: "modules/core.sh" provides: "sendToNotify() body fully-quoted (lines ~1387-1417); all variable expansions safe against word-splitting; URL interpolation quoted" pattern: 'sendToNotify'
- path: "modules/web.sh" provides: "1-char fix at line 2340 — Brosck → brosck in github.com/brosck/mantra@latest module path" pattern: 'github.com/brosck/mantra' pattern_absent: 'Brosck' key_links:
- from: "modules/core.sh sendToNotify() curl invocations" to: "shell argv parser" via: "fully-quoted variable expansions (no word-splitting on user-derived strings)" pattern: '"[$]{[A-Za-z_]+}"'
- from: "modules/web.sh axiom-exec mantra install path" to: "GitHub module path resolution (case-sensitive)" via: "lowercase brosck/mantra matching the local install path from commit f64383c2" pattern: 'github.com/brosck/mantra@latest'
- "D-04: Every variable expansion inside
Two security-hardening edits in `modules/`:
sendToNotify()full-function quoting pass (SEC-02 / D-04+D-05) — Quote every variable expansion inmodules/core.sh'ssendToNotify()body (~lines 1387-1417). Beyond the three names listed in the ROADMAP success criterion ($discord_url,${slack_channel},${1}), this is a full-function pass: every-Fform pair, every$NOTIFY_CONFIGreference ingrep/sedinvocations, and the Telegram URL interpolation. Per CONTEXT.md: a future contributor copy-pasting any line in this block should not be able to reintroduce the same class of bug from an unquoted neighbour.modules/web.sh:2340mantra path fix (FIX-01 / D-06) — 1-characterB→bchange soaxiom-exec "go install github.com/Brosck/mantra@latest"becomesaxiom-exec "go install github.com/brosck/mantra@latest". GitHub module path matching is case-sensitive; the current value 404s on the remote axiom node. The local install path was already corrected in commitf64383c2(install.sh:gotools["mantra"]="github.com/brosck/mantra"); this plan brings the axiom-exec branch into agreement.
Purpose: SEC-02 closes the audit finding that $discord_url, ${slack_channel}, and ${1} (filename) are unquoted in sendToNotify()'s curl calls, breaking on filenames with spaces and creating shell-metacharacter injection surface. CONTEXT.md D-04 elevates the patch from "fix the 3 named vars" to "fix the whole function body" so the function survives future copy-paste contributions. FIX-01 closes the Brosck/mantra typo so axiom-exec installs the tool successfully instead of falling back to a 404 + empty axiom-scan run.
Output: sendToNotify() body matches the target shape in PATTERNS.md (every $var → "${var}", every -F key=value → -F "key=value", every URL interpolation fully-quoted); modules/web.sh:2340 contains lowercase brosck; shellcheck-clean for the quoting pass.
Dependency note: This plan is Wave 2 / depends_on 02-03 because Plan 02-03 also edits modules/web.sh (15 axiom-scan call sites including line 2341 which is ONE LINE AWAY from this plan's line 2340). The two plans touch adjacent but non-overlapping lines; ordering 02-03 first lets the 1-character edit in this plan apply cleanly on top of the larger refactor.
@$HOME/.claude/get-shit-done/workflows/execute-plan.md @$HOME/.claude/get-shit-done/templates/summary.md @.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/02-security-quoting-supply-chain-hygiene/02-CONTEXT.md @.planning/phases/02-security-quoting-supply-chain-hygiene/02-PATTERNS.md @.planning/codebase/CONVENTIONS.md @.planning/codebase/CONCERNS.md @.planning/phases/02-security-quoting-supply-chain-hygiene/02-03-PLAN.mdFrom modules/core.sh:1387-1417 (CURRENT sendToNotify body — UNDER-QUOTED):
function sendToNotify {
if [[ -z $1 ]]; then
_print_status WARN "No file provided to send"
else
if [[ -z $NOTIFY_CONFIG ]]; then
NOTIFY_CONFIG=~/.config/notify/provider-config.yaml
fi
if [[ -n "$(find "${1}" -prune -size +8000000c)" ]]; then
_print_msg WARN "${1} is larger than 8MB, sending over external service"
transfer "${1}" | notify -silent
return 0
fi
if grep -q '^ telegram\|^telegram\|^ telegram' $NOTIFY_CONFIG; then
notification "Sending ${domain} data over Telegram" info
telegram_chat_id=$(sed -n '/^telegram:/,/^[^ ]/p' ${NOTIFY_CONFIG} | sed -n 's/^[ ]*telegram_chat_id:[ ]*"\([^"]*\)".*/\1/p')
telegram_key=$(sed -n '/^telegram:/,/^[^ ]/p' ${NOTIFY_CONFIG} | sed -n 's/^[ ]*telegram_api_key:[ ]*"\([^"]*\)".*/\1/p')
register_secret "$telegram_key"
run_command curl -F "chat_id=${telegram_chat_id}" -F "document=@${1}" https://api.telegram.org/bot${telegram_key}/sendDocument 2>>"$LOGFILE" >/dev/null
fi
if grep -q '^ discord\|^discord\|^ discord' $NOTIFY_CONFIG; then
notification "Sending ${domain} data over Discord" info
discord_url=$(sed -n '/^discord:/,/^[^ ]/p' ${NOTIFY_CONFIG} | sed -n 's/^[ ]*discord_webhook_url:[ ]*"\([^"]*\)".*/\1/p')
register_secret "$discord_url"
run_command curl -v -i -H "Accept: application/json" -H "Content-Type: multipart/form-data" -X POST -F 'payload_json={"username": "test", "content": "hello"}' -F file1=@${1} $discord_url 2>>"$LOGFILE" >/dev/null
fi
if [[ -n $slack_channel ]] && [[ -n $slack_auth ]]; then
notification "Sending ${domain} data over Slack" info
run_command curl -F file=@${1} -F "initial_comment=reconftw zip file" -F channels=${slack_channel} -H "Authorization: Bearer ${slack_auth}" https://slack.com/api/files.upload 2>>"$LOGFILE" >/dev/null
fi
fi
}
From modules/core.sh:1372-1386 (CANONICAL fully-quoted curl analog — transfer()):
function transfer() {
if [[ $ALLOW_TRANSFER != true ]]; then
return 0
fi
local file="${1:-}"
[[ -n "$file" && -s "$file" ]] || return 0
local file_name="${RANDOM}_${file##*/}"
run_command tar -czvf "/tmp/$file_name" "$file" >/dev/null 2>&1 && \
run_command curl -s "https://bashupload.com/${file_name}.tgz" \
--data-binary "@/tmp/$file_name" | grep wget
}
From modules/web.sh:2336-2342 (CURRENT axiom-exec mantra block — BEFORE the Plan 02-03 axiom_extra_args migration on line 2341):
if [[ -s "js/js_livelinks.txt" ]]; then
if [[ $AXIOM != true ]]; then
cat js/js_livelinks.txt | mantra -ua \"$HEADER\" -s | anew -q js/js_secrets.txt 2>>"$LOGFILE" >/dev/null || true
else
axiom-exec "go install github.com/Brosck/mantra@latest" 2>>"$LOGFILE" >/dev/null
run_command axiom-scan js/js_livelinks.txt -m mantra -ua "$HEADER" -s -o js/js_secrets.txt "$AXIOM_EXTRA_ARGS" &>/dev/null
fi
After Plan 02-03 lands (Wave 1), line 2341 (the axiom-scan invocation) becomes:
run_command axiom-scan js/js_livelinks.txt -m mantra -ua "$HEADER" -s -o js/js_secrets.txt "${AXIOM_EXTRA_ARGS_ARR[@]}" &>/dev/null
This plan (02-02) leaves line 2341 alone and edits only the Brosck on line 2340.
Precedent reference (commit f64383c2 — already merged):
- ["mantra"]="github.com/Brosck/mantra"
+ ["mantra"]="github.com/brosck/mantra"
Currently in install.sh:330 (already merged): ["mantra"]="github.com/brosck/mantra".
1. `[[ -z $1 ]]` → `[[ -z "${1}" ]]`
2. `[[ -z $NOTIFY_CONFIG ]]` → `[[ -z "${NOTIFY_CONFIG}" ]]`
3. `grep -q '...' $NOTIFY_CONFIG` (Telegram branch) → `grep -q '...' "${NOTIFY_CONFIG}"`
4. `sed -n '/^telegram:/,/^[^ ]/p' ${NOTIFY_CONFIG}` (Telegram chat_id extraction) → `sed -n '/^telegram:/,/^[^ ]/p' "${NOTIFY_CONFIG}"`
5. `sed -n '/^telegram:/,/^[^ ]/p' ${NOTIFY_CONFIG}` (Telegram api_key extraction) → `sed -n '/^telegram:/,/^[^ ]/p' "${NOTIFY_CONFIG}"`
6. `register_secret "$telegram_key"` — already correctly quoted; either leave verbatim or normalise to `register_secret "${telegram_key}"` for stylistic consistency
7. `run_command curl -F "chat_id=${telegram_chat_id}" -F "document=@${1}" https://api.telegram.org/bot${telegram_key}/sendDocument 2>>"$LOGFILE" >/dev/null` — the `-F "chat_id=..."` and `-F "document=@${1}"` pairs are already quoted; quote the bare URL: append `"` around the whole `https://...` argument so it becomes `"https://api.telegram.org/bot${telegram_key}/sendDocument"`
8. `grep -q '...' $NOTIFY_CONFIG` (Discord branch) → `grep -q '...' "${NOTIFY_CONFIG}"`
9. `sed -n '/^discord:/,/^[^ ]/p' ${NOTIFY_CONFIG}` → `sed -n '/^discord:/,/^[^ ]/p' "${NOTIFY_CONFIG}"`
10. `register_secret "$discord_url"` — already correctly quoted; either leave verbatim or normalise to `register_secret "${discord_url}"`
11. `-F file1=@${1} $discord_url` → `-F "file1=@${1}" "${discord_url}"`
12. `[[ -n $slack_channel ]] && [[ -n $slack_auth ]]` → `[[ -n "${slack_channel}" ]] && [[ -n "${slack_auth}" ]]`
13. `-F file=@${1} -F "initial_comment=reconftw zip file" -F channels=${slack_channel}` → `-F "file=@${1}" -F "initial_comment=reconftw zip file" -F "channels=${slack_channel}"`
14. `-H "Authorization: Bearer ${slack_auth}"` — already correctly quoted; leave verbatim
Preserve VERBATIM:
- The function declaration form `function sendToNotify {` (no parentheses). Do NOT normalise to `function sendToNotify()`.
- The literal-string `-F 'payload_json={"username": "test", "content": "hello"}'` argument with single quotes — these are intentional (single quotes prevent expansion of the JSON braces).
- The `2>>"$LOGFILE" >/dev/null` redirection chain.
- The `notification "Sending ${domain} data over Telegram" info` / `... over Discord` / `... over Slack` info calls — already correctly quoted.
- The line `_print_msg WARN "${1} is larger than 8MB, sending over external service"` — already correctly quoted.
- The `transfer "${1}" | notify -silent` call — already correctly quoted.
- The `[[ -n "$(find "${1}" -prune -size +8000000c)" ]]` test — already correctly quoted.
Per D-05: After the pass, run `shellcheck -s bash modules/core.sh` and capture findings filtered to lines 1385-1420. The diff vs baseline must show NO NEW SC2086 / SC2068 / SC2027 findings within this line range. If any intentional word-split survives (none expected in this block), annotate with an inline `# shellcheck disable=SCXXXX # <reason>` on the line ABOVE the offending expansion — NEVER a file-level disable directive (CONVENTIONS.md:277).
Per CONTEXT.md Claude's Discretion: shellcheck is already wired into `.pre-commit-config.yaml` (CONVENTIONS.md); the pre-commit gate will catch any regression automatically — running shellcheck explicitly here is verification, not new tooling.
bash -n modules/core.sh && grep -nE '\$1[^"}]|\$NOTIFY_CONFIG[^"}]|\$discord_url[^"}]|\$slack_channel[^"}]|\$slack_auth[^"}]' modules/core.sh | awk -F: '$1>=1385 && $1<=1420' | wc -l | tr -d ' '
- `bash -n modules/core.sh` exits 0
- `grep -nE '\$1[^"}]|\$NOTIFY_CONFIG[^"}]|\$discord_url[^"}]|\$slack_channel[^"}]|\$slack_auth[^"}]' modules/core.sh | awk -F: '$1>=1385 && $1<=1420' | wc -l | tr -d ' '` returns `0` (no bare-`$` variable references inside the sendToNotify body)
- `awk 'NR>=1385 && NR<=1420' modules/core.sh | grep -cE 'grep -q .* \$NOTIFY_CONFIG'` returns `0` (the Telegram + Discord `grep -q` lines now quote NOTIFY_CONFIG)
- `awk 'NR>=1385 && NR<=1420' modules/core.sh | grep -cE 'sed -n .* \$\{NOTIFY_CONFIG\}'` returns `0` (the bare-brace form is also quoted now)
- `awk 'NR>=1385 && NR<=1420' modules/core.sh | grep -c 'https://api.telegram.org/bot'` returns at least 1 hit AND that line contains the full URL inside double quotes (regex check: `grep -E '"https://api\.telegram\.org/bot\$\{telegram_key\}/sendDocument"' modules/core.sh` returns at least 1 hit)
- `awk 'NR>=1385 && NR<=1420' modules/core.sh | grep -cE '\-F file1?=@'` returns `0` (no bare-form `-F file=@...` or `-F file1=@...` remain; all are quoted-pair form)
- `awk 'NR>=1385 && NR<=1420' modules/core.sh | grep -cE '\-F channels=\$'` returns `0` (no bare-form `-F channels=$slack_channel` remains)
- `awk 'NR>=1385 && NR<=1420' modules/core.sh | grep -c 'function sendToNotify {'` returns exactly `1` (declaration form preserved — no `()` introduced)
- `shellcheck -s bash --severity=error modules/core.sh` exits 0 (no NEW error-level findings introduced by the quoting pass)
- Optionally: `shellcheck -s bash modules/core.sh 2>&1 | awk -F: '$2>=1385 && $2<=1420' | grep -cE 'SC2086|SC2068|SC2027'` returns `0` (no NEW warning-level findings in the SC208x/SC202x family within the function range)
sendToNotify body has every variable expansion double-quoted; no bare `$1` / `$NOTIFY_CONFIG` / `$discord_url` / `$slack_channel` / `$slack_auth` remain inside lines 1385-1420; all `-F` form pairs are quoted-pair form; the Telegram URL is quoted; function declaration form preserved verbatim; shellcheck clean.
Task 2: One-character mantra path fix at modules/web.sh:2340
modules/web.sh
- modules/web.sh — locate the axiom-exec mantra-install line: run `grep -n 'Brosck/mantra' modules/web.sh` (should return 1 hit; the line is around :2340 pre-Plan-02-03, may have shifted slightly after Plan 02-03's local-block deletion in webprobe_full removed 7 lines earlier in the file)
- install.sh:330 (verify the local install path uses lowercase `["mantra"]="github.com/brosck/mantra"` — this is the precedent established by commit f64383c2)
- .planning/phases/02-security-quoting-supply-chain-hygiene/02-CONTEXT.md section "D-06"
- .planning/phases/02-security-quoting-supply-chain-hygiene/02-PATTERNS.md section "modules/web.sh:2340 — Brosck → brosck 1-char fix"
- .planning/phases/02-security-quoting-supply-chain-hygiene/02-03-PLAN.md (read frontmatter `files_modified` — confirm modules/web.sh is also edited there at non-overlapping lines)
Per D-06 / FIX-01: Locate the unique line in modules/web.sh that currently reads:
```bash
axiom-exec "go install github.com/Brosck/mantra@latest" 2>>"$LOGFILE" >/dev/null
```
(Approximate line 2340 pre-Plan-02-03; may be ~2333 after Plan 02-03 deletes 7 lines in webprobe_full at the top of the file. Use text-keyed lookup, not line-number lookup, to be resilient.)
Replace `Brosck` with `brosck` (lowercase B → b) so the line reads:
```bash
axiom-exec "go install github.com/brosck/mantra@latest" 2>>"$LOGFILE" >/dev/null
```
This is a 1-character change. Preserve VERBATIM:
- The surrounding indentation (matches the existing if/else block).
- The double-quoted bash-style `"go install ..."` argument to axiom-exec.
- The redirect `2>>"$LOGFILE" >/dev/null`.
Do NOT touch the adjacent line 2341 (the axiom-scan invocation with `"${AXIOM_EXTRA_ARGS_ARR[@]}"`) — that line was migrated by Plan 02-03 (`depends_on: ["02-03"]`). If for some reason 02-03's migration of line 2341 has NOT landed (the executor is running plans out of order), STOP and surface the issue to the developer; the plan ordering is `02-03` then `02-02`.
Do NOT touch line 2338 (the local-mode `cat js/js_livelinks.txt | mantra -ua \"$HEADER\" -s | anew ...` line) — it doesn't reference any Brosck/brosck case; the local mantra binary on PATH is invoked directly without a module-path reference.
bash -n modules/web.sh && grep -c 'Brosck' modules/web.sh && grep -c 'github.com/brosck/mantra@latest' modules/web.sh
- `bash -n modules/web.sh` exits 0
- `grep -c 'Brosck' modules/web.sh` returns `0` (no remaining uppercase-B reference anywhere in the file)
- `grep -c 'github.com/brosck/mantra@latest' modules/web.sh` returns at least `1` (the fixed line)
- `grep -n 'github.com/brosck/mantra@latest' modules/web.sh | awk -F: 'NR==1 {print $1}'` is within ±15 lines of 2340 (allow for Plan 02-03's earlier deletions shifting the line number; the line still lives in the same axiom-exec block — verifiable by `grep -B2 -A2 'github.com/brosck/mantra@latest' modules/web.sh` showing the surrounding `if [[ $AXIOM != true ]]; then ... else ... axiom-scan ... fi` context)
- The line 2341 (or wherever the axiom-scan immediately following lives) shows `"${AXIOM_EXTRA_ARGS_ARR[@]}"` (verifying Plan 02-03 landed first per the depends_on contract)
- Cross-file consistency check: `grep -E 'brosck/mantra' install.sh modules/web.sh | wc -l | tr -d ' '` returns at least `2` (one in install.sh:gotools, one in modules/web.sh axiom-exec — local and remote install paths now agree)
- `shellcheck -s bash --severity=error modules/web.sh` exits 0 (no NEW error-level findings)
modules/web.sh contains the lowercase `github.com/brosck/mantra@latest` axiom-exec module path; no `Brosck` references remain in the file; local (install.sh) and remote (modules/web.sh) install paths agree.
## Trust Boundaries
| Boundary | Description |
|---|---|
| filename / config string → curl argv | ${1} (caller-supplied filename), $NOTIFY_CONFIG (config-derived path), $discord_url / $telegram_key / $slack_channel / $slack_auth (notify.conf-derived secrets) all enter curl's argv via shell expansion. |
bash -lc arg → remote go install |
axiom-exec "go install <module>@latest" runs the quoted string remotely; module path correctness is essential because case-sensitive resolution is the failure mode FIX-01 addresses. |
STRIDE Threat Register
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|---|---|---|---|---|
| T-02-02-01 | I (Information Disclosure) | sendToNotify filename ${1} injected into curl argv unquoted |
mitigate | D-04 quotes every ${1} reference in -F file=@${1}, -F file1=@${1}, -F document=@${1}. A filename containing spaces (e.g., recon report.zip) no longer word-splits into multiple curl form-fields. |
| T-02-02-02 | T (Tampering) | $discord_url unquoted in curl invocation; webhook URL containing whitespace breaks the call |
mitigate | D-04 quotes "${discord_url}". Discord webhook URLs do not typically contain whitespace, but the un-quoted form is indistinguishable from intentional word-split and creates ambiguity for future contributors. |
| T-02-02-03 | T (Tampering) | $NOTIFY_CONFIG path containing shell metacharacters reaches grep/sed unquoted |
mitigate | D-04 quotes "${NOTIFY_CONFIG}" at all 5 reference sites. A config-path with spaces (e.g., ~/My Configs/notify.yaml) now works correctly. |
| T-02-02-04 | T (Tampering) | Telegram URL interpolation https://api.telegram.org/bot${telegram_key}/sendDocument bare-form word-splits if $telegram_key contains a space (it shouldn't, but defence-in-depth) |
mitigate | D-04 quotes the whole URL. The register_secret "$telegram_key" call also ensures the key value is redacted from log output. |
| T-02-02-05 | T (Tampering) | Future contributor copy-pastes an unquoted neighbour expansion when adding a new notify backend | mitigate | D-04 makes the full function shellcheck-clean. A new contribution that re-introduces an unquoted form fails the pre-commit shellcheck hook. CONVENTIONS.md inline-disable policy (D-05) prevents file-level shellcheck-disable workarounds. |
| T-02-02-06 | D (Denial of Service) | Axiom-exec mantra install 404s on case-sensitive GitHub path; subsequent axiom-scan runs with no module installed, producing empty output silently | mitigate | D-06 changes Brosck → brosck (matching commit f64383c2 / current install.sh:330). The remote install path now resolves correctly; mantra is installed; axiom-scan runs against a real binary. |
| T-02-02-07 | R (Repudiation) | "Why is the axiom-mantra output empty?" debugging trail | mitigate | After D-06, axiom-mantra produces real output. The prior silent failure mode is gone; the 2>>"$LOGFILE" capture remains for any future failure. |
| T-02-02-08 | S (Spoofing) | The lowercase brosck/mantra GitHub user is the upstream-trusted source for the mantra tool — there is no risk of a typo-squat at the GitHub-username level because user names are unique and case-folded for username matching (only module paths are case-sensitive) |
accept | The fix aligns the module path with the canonical upstream. No new spoofing surface introduced. |
Residual risk: None within this plan's scope. The full-function quoting pass removes the entire neighbour-copy-paste regression vector. The 1-char fix is a tiny but high-value patch that closes a silent-failure path. Future notify-backend additions must follow the now-canonical quoting pattern (enforced by pre-commit shellcheck).
- `bash -n modules/core.sh modules/web.sh` → all exit 0 - `grep -nE '\$1[^"}]|\$NOTIFY_CONFIG[^"}]|\$discord_url[^"}]|\$slack_channel[^"}]|\$slack_auth[^"}]' modules/core.sh | awk -F: '$1>=1385 && $1<=1420' | wc -l | tr -d ' '` → `0` - `grep -c 'Brosck' modules/web.sh` → `0` - `grep -c 'github.com/brosck/mantra@latest' modules/web.sh` → at least `1` - `shellcheck -s bash --severity=error modules/core.sh modules/web.sh` → exit 0 (no NEW error-level findings) - Cross-file consistency: `grep -E 'brosck/mantra' install.sh modules/web.sh | wc -l | tr -d ' '` → at least `2` - Plan-ordering proof: in modules/web.sh, the axiom-scan line immediately following the (now-fixed) axiom-exec brosck line contains `"${AXIOM_EXTRA_ARGS_ARR[@]}"` (proves Plan 02-03 landed first) - shellcheck targeted: `shellcheck -s bash modules/core.sh 2>&1 | awk -F: '$2>=1385 && $2<=1420' | grep -cE 'SC2086|SC2068|SC2027'` → `0` - Optional smoke: `bash -c 'source modules/core.sh 2>/dev/null; declare -f sendToNotify >/dev/null && echo OK'` → `OK` (function still parses and is declarable in isolation) - ROADMAP §"Phase 2" SC#2 satisfied: `sendToNotify()` in `modules/core.sh` quotes every variable passed to `curl` (`"$discord_url"`, `"${slack_channel}"`, `"${1}"` named in the criterion — and the rest of the body per D-04); shellcheck reports no new findings against the function range. - ROADMAP §"Phase 2" SC#5 satisfied: running `axiom-exec mantra` against a remote node installs `github.com/brosck/mantra@latest` (lowercase) and the binary runs — the previous 404 / module-not-found on case-sensitive GitHub paths is gone. - All `must_haves.truths` observable per the acceptance criteria above. - Function declaration form `function sendToNotify {` preserved verbatim (no parentheses introduced). - No file-level shellcheck-disable directives added (D-05 / CONVENTIONS.md:277). - Local (`install.sh:gotools`) and remote (`modules/web.sh:axiom-exec`) install paths for mantra agree on lowercase `brosck/mantra`.