Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add HermeticOrmus/LibreSecOps-Claude-Code --skill ci-security-patternsgit clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-CodeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/ci-security-patterns)<a href="https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/ci-security-patterns"><img src="https://agentmods.dev/badge/skills/hermeticormus/libresecops-claude-code/ci-security-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/ci-security-patterns"><img src="https://agentmods.dev/badge/skills/hermeticormus/libresecops-claude-code/ci-security-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.02772 |
| Opus 5.5 | $0.00018 | $0.01109 |
| Sonnet 5.5 | $0.00009 | $0.00554 |
| Haiku 4.5 | $0.00005 | $0.00277 |
Grade A, and why
ci-security-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CI Security Patterns
Reference patterns for integrating security scanning into GitHub Actions, GitLab CI, and Jenkins pipelines with real workflow syntax and production-ready configurations.
Knowledge Base
Pipeline Security Stage Ordering
Security scans should be ordered by speed and cost. Fast checks run first so slow checks only run on code that passes basic hygiene.
Pre-commit (local) --> Secrets + Lint
|
Commit/PR (CI) --> Secrets --> SAST --> SCA --> License
|
Build (CI) --> Container Scan --> SBOM --> Sign
|
Test (CI) --> DAST (baseline) --> API Scan
|
Deploy (CI) --> IaC Scan --> Artifact Verification
|
Runtime (CD) --> Monitoring --> Runtime Protection
Key Design Decisions
Scan-on-PR vs. Scan-on-Push: Run fast scans (SAST, secrets, SCA) on every PR. Run slower scans (DAST, full container scan) on merge to main or on a schedule.
Incremental vs. Full Scan: On PRs, scan only changed files (incremental) for speed. On main branch, run full scans. This is critical for SAST where full-project scans can take minutes.
Fail-open vs. Fail-closed on tool error: If the scanner itself crashes (not a finding, but the tool failing), should the pipeline pass or fail? Default: fail-open on PR (do not block development due to tool issues), fail-closed on deploy to production.
Patterns
Pattern 1: GitHub Actions -- Comprehensive Security Pipeline
name: Security Pipeline
on:
pull_request:
branches: [main, develop]
push:
branches: [main]
schedule:
- cron: '0 4 * * 1' # Full scan weekly
permissions:
contents: read
security-events: write # Required for SARIF upload
pull-requests: write # Required for PR comments
jobs:
# Stage 1: Fast checks (< 1 minute)
secrets-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for gitleaks
- name: Run gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Stage 2: SAST (1-5 minutes)
sast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Semgrep
uses: semgrep/semgrep-action@v1
with:
config: >-
p/default
p/owasp-top-ten
p/r2c-security-audit
generateSarif: "1"
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: semgrep.sarif
# Stage 3: SCA (1-3 minutes)
dependency-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run osv-scanner
uses: google/osv-scanner-action/osv-scanner-action@v1
with:
scan-args: |-
--recursive
--format=sarif
--output=osv-results.sarif
.
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: osv-results.sarif
# Stage 4: Container scan (if Dockerfile exists)
container-scan:
runs-on: ubuntu-latest
if: hashFiles('**/Dockerfile') != ''
needs: [secrets-scan, sast] # Only if earlier stages pass
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -t ${{ github.repository }}:${{ github.sha }} .
- name: Run Trivy
uses: aquasecurity/[email protected]
with:
image-ref: ${{ github.repository }}:${{ github.sha }}
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH
exit-code: 1 # Fail on critical/high
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
# Stage 5: IaC scan (if terraform/cloudformation present)
iac-scan:
runs-on: ubuntu-latest
if: hashFiles('**/*.tf') != '' || hashFiles('**/cloudformation/**') != ''
steps:
- uses: actions/checkout@v4
- name: Run Checkov
uses: bridgecrewio/checkov-action@v12
with:
output_format: sarif
output_file_path: checkov-results.sarif
soft_fail: false
framework: terraform,cloudformation
# Stage 6: SBOM generation (on main branch only)
sbom:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [sast, dependency-scan]
steps:
- uses: actions/checkout@v4
- name: Generate SBOM
uses: anchore/sbom-action@v0
with:
format: cyclonedx-json
output-file: sbom.cdx.json
- name: Upload SBOM
uses: actions/upload-artifact@v4
with:
name: sbom
path: sbom.cdx.json
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +5 lines · +45 tokens per session c21ab69d6824
- 3mo ago First seen · 343 lines · 0 tokens per session scan A daee0f504288
ci-security-patterns is a skill published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 2,772 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
ci-security-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ci-security-patternsHermeticOrmus/LibreSecOps-Claude-Code | Skill | 4 | 1mo ago | MIT | A | 45 | Claude Code |
| implementing-devsecops-security-scanningxalgorix/xalgorix | Skill | 1.5k | today | Apache-2.0 | A | 109 | Claude Code, Codex |
| building-devsecops-pipeline-with-gitlab-cixalgorix/xalgorix | Skill | 1.5k | today | Apache-2.0 | A | 43 | Claude Code, Codex |
| integrating-dast-with-owasp-zap-in-pipelinexalgorix/xalgorix | Skill | 1.5k | today | Apache-2.0 | A | 76 | Claude Code, Codex |
| integrating-dast-with-owasp-zap-in-pipelineadriannoes/awesome-agentic-ai | Skill | 108 | 2d ago | MIT | A | 76 | Claude Code, Codex |
| building-devsecops-pipeline-with-gitlab-ciadriannoes/awesome-agentic-ai | Skill | 108 | 2d ago | MIT | A | 43 | Claude Code, Codex |
| building-devsecops-pipeline-with-gitlab-ci26zl/cybersec-toolkit | Skill | 113 | 4d ago | MIT | A | 101 | Claude Code |