{
  "id": "vuln-patterns",
  "name": "vuln-patterns",
  "summary": "Semgrep rules taken from vulnerabilities that are already public. Tag v0.1.2 has 15 rules under rules/, covering C, Go, JavaScript, PHP, Python and Rust. The release has no archives: clone the tag and point Semgrep at the rules.",
  "category": "rules",
  "language": "semgrep",
  "license": "MIT",
  "repository": "https://github.com/ucsurf/vuln-patterns",
  "version": "0.1.2",
  "released_at": "2026-11-02T19:07:19+00:00",
  "published_at": "2026-10-31T07:17:55+00:00",
  "release_url": "https://github.com/ucsurf/vuln-patterns/releases/tag/v0.1.2",
  "distribution": "git-tag",
  "install": [
    "git clone --depth 1 --branch v0.1.2 https://github.com/ucsurf/vuln-patterns",
    "semgrep --config vuln-patterns/rules/ path/to/code"
  ],
  "usage": [
    {
      "label": "Clone and scan, as the README shows it",
      "command": "git clone --depth 1 https://github.com/ucsurf/vuln-patterns\nsemgrep --config vuln-patterns/rules/ path/to/code",
      "lang": "sh",
      "note": "This clone follows the default branch. It does not pin v0.1.2."
    },
    {
      "label": "Pin the v0.1.2 tag",
      "command": "git clone --depth 1 --branch v0.1.2 https://github.com/ucsurf/vuln-patterns\nsemgrep --config vuln-patterns/rules/ path/to/code",
      "lang": "sh",
      "note": "v0.1.2 is the latest tag. That GitHub release has no attached archives."
    },
    {
      "label": "One rule from the v0.1.2 tag",
      "command": "semgrep --config vuln-patterns/rules/go/crypto/pkcs7-first-cert-as-signer.yaml path/to/code",
      "lang": "sh"
    },
    {
      "label": "GitHub Actions, pinned to v0.1.2 and Semgrep 1.183.0",
      "command": "jobs:\n  vuln-patterns:\n    runs-on: ubuntu-latest\n    permissions: { contents: read }\n    steps:\n      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n        with: { persist-credentials: false }\n      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n        with: { repository: ucsurf/vuln-patterns, ref: v0.1.2, path: .vuln-patterns, persist-credentials: false }\n      - run: pipx run semgrep==1.183.0 --config .vuln-patterns/rules/ --error --metrics=off --exclude .vuln-patterns .",
      "lang": "yaml",
      "note": "Copied from the README. The README says the rules are tested with Semgrep 1.183.0."
    },
    {
      "label": "pre-commit, using Semgrep's own hook",
      "command": "repos:\n  - repo: https://github.com/semgrep/pre-commit\n    rev: v1.183.0\n    hooks:\n      - id: semgrep\n        args: [\"--config\", \".vuln-patterns/rules/\", \"--error\", \"--metrics=off\", \"--skip-unknown-extensions\"]",
      "lang": "yaml",
      "note": "The README says to point this hook at a checkout of the rules, for example a git submodule at .vuln-patterns."
    }
  ],
  "links": [
    {
      "label": "README at v0.1.2",
      "url": "https://github.com/ucsurf/vuln-patterns/blob/v0.1.2/README.md"
    },
    {
      "label": "Rules at v0.1.2",
      "url": "https://github.com/ucsurf/vuln-patterns/tree/v0.1.2/rules"
    }
  ],
  "updated_at": "2026-11-06T17:47:00+00:00",
  "public": true
}
