Skip to content

chore(security): clear Hypatia false-positives (.envrc example + setup.sh doc)#35

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/wizardly-archimedes-9pnqed
Jun 20, 2026
Merged

chore(security): clear Hypatia false-positives (.envrc example + setup.sh doc)#35
hyperpolymath merged 2 commits into
mainfrom
claude/wizardly-archimedes-9pnqed

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Why

Follow-up to #34, addressing the residual false-positive findings from the Hypatia scan on that PR. No runtime behaviour changes — these only remove patterns that trip naive scanners.

Changes

.envrc "Generic API key" (was flagged critical — false positive)

Line 24 was a commented # export API_KEY="..." placeholder (value literally "..."), which is why gitleaks/trufflehog all passed. Moved the commented API_KEY / DATABASE_URL examples into a new .envrc.example template; .envrc keeps a pointer comment. Real secrets still belong in a local, gitignored .env (loaded by dotenv_if_exists).

setup.sh doc references (CWE-494 hardening tidy-up)

  • Dropped the curl … | sh convenience one-liner from the usage comment.
  • Reworded the helper header (avoids curl|shno pipe-to-shell).

After this, no curl-pipe-to-shell substring remains anywhere in setup.sh — even in comments — so a line-regex scanner finds zero.

Verification

  • sh -n setup.sh passes.
  • grep confirms zero curl|wget … | sh/bash matches in setup.sh and zero API_KEY=/DATABASE_URL= assignments in .envrc.
  • .envrc.example carries an SPDX MPL-2.0 header (REUSE-compliant).

Note on the other Hypatia findings

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y2MWTAqX2x7goVJzjFB4j5


Generated by Claude Code

…, curl|sh doc)

Follow-up to #34. No runtime behaviour changes — these only remove patterns
that trip naive scanners:

- .envrc: move the commented `# export API_KEY="..."` / DATABASE_URL examples
  (flagged as a "Generic API key" — a false positive: commented "..."
  placeholders) into a new .envrc.example template. .envrc keeps a pointer
  comment; real secrets still go in a gitignored .env via dotenv_if_exists.
- setup.sh: drop the `curl … | sh` convenience one-liner from the usage
  comment and reword the helper header ("avoids curl|sh" -> "no
  pipe-to-shell") so no curl-pipe-to-shell substring remains anywhere.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2MWTAqX2x7goVJzjFB4j5
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 3 issues detected

Severity Count
🔴 Critical 1
🟠 High 0
🟡 Medium 2

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "line": 9,
    "reason": "Secret found: Generic API key",
    "type": "secret_detected",
    "file": "/home/runner/work/wokelangiser/wokelangiser/.envrc.example",
    "action": "revoke_rotate_and_purge",
    "rule_module": "security_errors",
    "severity": "critical"
  },
  {
    "reason": "1 workflow(s) with tag-pinned (not SHA-pinned) actions in wokelangiser",
    "type": "DependencyPinning",
    "file": "/home/runner/work/wokelangiser/wokelangiser",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "medium",
    "remediation": "Pin GitHub Actions and Docker base images by SHA hash.",
    "scorecard_check": "Pinned-Dependencies"
  },
  {
    "reason": "Repository has 12 non-main remote branch(es). Policy: single main branch only.",
    "type": "GS007",
    "file": ".",
    "action": "delete_remote_branches",
    "rule_module": "git_state",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Comment thread .envrc.example Fixed
The relocated `# export API_KEY="..."` example tripped Hypatia's secret_detected
rule on .envrc.example (same false positive, new file). Describe the optional
vars in prose (no NAME="value" assignment, no API_KEY token) so no tracked file
contains a secret-looking pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2MWTAqX2x7goVJzjFB4j5
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 2 issues detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 2
View findings
[
  {
    "reason": "1 workflow(s) with tag-pinned (not SHA-pinned) actions in wokelangiser",
    "type": "DependencyPinning",
    "file": "/home/runner/work/wokelangiser/wokelangiser",
    "action": "auto_fix",
    "rule_module": "scorecard",
    "severity": "medium",
    "remediation": "Pin GitHub Actions and Docker base images by SHA hash.",
    "scorecard_check": "Pinned-Dependencies"
  },
  {
    "reason": "Repository has 12 non-main remote branch(es). Policy: single main branch only.",
    "type": "GS007",
    "file": ".",
    "action": "delete_remote_branches",
    "rule_module": "git_state",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath hyperpolymath marked this pull request as ready for review June 20, 2026 16:49
@hyperpolymath hyperpolymath merged commit 9b8027b into main Jun 20, 2026
21 checks passed
hyperpolymath added a commit that referenced this pull request Jun 21, 2026
…esh 6a2 state (#37)

- SPDX: PMPL-1.0-or-later -> MPL-2.0 in governance.yml, hypatia-scan.yml,
  scorecard.yml (matches repo policy + the no-pmpl contractile rule).
- Fill unfilled {{...}} template placeholders with real values:
  anchors/ANCHOR.a2ml, flake.nix (+enable Rust/Idris2/Zig dev shell),
  guix.scm, .guix-channel.
- Refresh .machine_readable/6a2: STATE (date, PRs #34/#35/#36, blockers),
  PLAYBOOK (document branch-cleanup workflow + proxy-blocks-deletes),
  NEUROSYM (record upstream standards@5a93d9d Hypatia pin breakage).
- QUICKSTART-DEV.adoc: fill placeholders and correct non-existent recipe
  names (setup-dev/panic-scan/llm-context -> real recipes).


Claude-Session: https://claude.ai/code/session_01Y2MWTAqX2x7goVJzjFB4j5

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants