Skip to content

feat(ci): GitHub security pipeline (OWASP LLM Top 10 + secrets + LaTeX injection) - #19

Merged
datarian merged 3 commits into
mainfrom
claude/github-security-pipeline
Jun 13, 2026
Merged

feat(ci): GitHub security pipeline (OWASP LLM Top 10 + secrets + LaTeX injection)#19
datarian merged 3 commits into
mainfrom
claude/github-security-pipeline

Conversation

@datarian

Copy link
Copy Markdown
Owner

Summary

  • Adds .github/workflows/security.yml — 5-job security pipeline triggered on every PR (open, synchronize, reopen)
  • Adds .github/semgrep/llm-owasp.yaml — custom Semgrep rules for OWASP LLM Top 10 risks specific to a Claude Code plugin

Jobs

Job Tool Catches
Secret Scanning Gitleaks v2 Hardcoded credentials across full PR commit history
npm Dependency Audit npm audit Vulnerable packages in resumes/web-builder (skips gracefully if not yet committed)
SAST Semgrep auto + custom TypeScript/React vulnerabilities + OWASP LLM Top 10; results go to GitHub Security tab as SARIF
LaTeX Injection grep \write18 and shell_escape in .tex templates (arbitrary shell execution)
Personal Data Leak git ls-files Hard-fails if PERSONAL_PROFILE.md, .backup. files, or compiled resumes are accidentally tracked

OWASP LLM Top 10 custom rules

  • LLM01 Prompt Injection — string concatenation into prompt builders
  • LLM02 Insecure Output Handling — innerHTML =, document.write, dangerouslySetInnerHTML
  • LLM05 Supply Chain — preinstall/postinstall hooks in package.json
  • LLM06 Sensitive Data — Anthropic/OpenAI/GitHub token patterns
  • LLM08 Excessive Agency — eval(), new Function(), dynamic child_process.exec

Test plan

  • All 5 jobs appear in CI on this PR
  • GITLEAKS_LICENSE secret can be left unset (public repo)
  • npm audit job skips gracefully (resumes/web-builder not yet committed)
  • LaTeX safety job passes (no \write18 in templates)
  • PII check passes (profile files are gitignored)

🤖 Generated with Claude Code

hashFiles() is not available in job-level if conditions — only
step-level. Replace with a checkout + bash file-existence check that
sets a step output, then gate the remaining npm-audit steps on that
output. Also add the required glob pattern to the step-level hashFiles
call in the semgrep job.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

datarian and others added 2 commits June 13, 2026 08:26
Two rules had patterns semgrep cannot parse:
- llm08-child-process-exec-dynamic: "..." inside a string literal is not
  valid semgrep ellipsis syntax — remove pattern-not, flag all exec() calls
- llm02-dangerous-set-inner-html: standalone JSX attribute pattern is
  unreliable to parse — switch to pattern-regex on generic language

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v3 is deprecated in December 2026.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@datarian
datarian merged commit 8c41b5b into main Jun 13, 2026
6 checks passed
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.

2 participants