ci-security-patterns

ci-security-patterns is a skill for Claude Code from HermeticOrmus/LibreSecOps-Claude-Code. It costs 45 tokens per session (2,772 once invoked), scanned A, original, MIT.

A reference for arranging security checks in continuous integration pipelines. Continuous integration runs automated checks when code is changed; a pipeline is the ordered set of those checks.

In plain words
What is it for?
Use it when setting up GitHub Actions, GitLab CI, or Jenkins checks for secrets, code weaknesses, dependencies, licenses, containers, APIs, infrastructure, and runtime protection.
Why use it?
It helps teams run quick, low-cost checks before slower scans and choose when different security checks should run.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the devsecops-pipelines plugin — 2 skills, 2 commands, 2 agents shipped together

Good fit Use it when setting up GitHub Actions, GitLab CI, or Jenkins checks for secrets, code weaknesses, dependencies, licenses, containers, APIs, infrastructure, and runtime protection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hermeticormus/libresecops-claude-code/ci-security-patterns
Install

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.

Any agent
npx skills add HermeticOrmus/LibreSecOps-Claude-Code --skill ci-security-patterns
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code

Made for: Claude Code.

Or install devsecops-pipelines, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 2 agents.

Wrote 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.

agentmods badge for ci-security-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/hermeticormus/libresecops-claude-code/ci-security-patterns/github.svg)](https://agentmods.dev/skills/hermeticormus/libresecops-claude-code/ci-security-patterns)
Your own site
<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.

agentmods 80×15 button for ci-security-patterns

Your own site · 80×15
<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>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,772 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash c21ab69d6824, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

plugins/devsecops-pipelines/skills/ci-security-patterns/SKILL.md · 348 lines

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

Read the full file on GitHub · 348 lines

Changes

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.

  1. 1mo ago Changed · +5 lines · +45 tokens per session c21ab69d6824
  2. 3mo ago First seen · 343 lines · 0 tokens per session scan A daee0f504288

Subscribe to this mod's changes

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.

Related

ci-security-patterns compared with skills from other repositories

ci-security-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ci-security-patternsHermeticOrmus/LibreSecOps-Claude-CodeSkill41mo agoMITA45Claude Code
implementing-devsecops-security-scanningxalgorix/xalgorixSkill1.5ktodayApache-2.0A109Claude Code, Codex
building-devsecops-pipeline-with-gitlab-cixalgorix/xalgorixSkill1.5ktodayApache-2.0A43Claude Code, Codex
integrating-dast-with-owasp-zap-in-pipelinexalgorix/xalgorixSkill1.5ktodayApache-2.0A76Claude Code, Codex
integrating-dast-with-owasp-zap-in-pipelineadriannoes/awesome-agentic-aiSkill1082d agoMITA76Claude Code, Codex
building-devsecops-pipeline-with-gitlab-ciadriannoes/awesome-agentic-aiSkill1082d agoMITA43Claude Code, Codex
building-devsecops-pipeline-with-gitlab-ci26zl/cybersec-toolkitSkill1134d agoMITA101Claude Code