AGENT SKILL

sarif-exporter

Exports security scan results, threat matrices, and vulnerability findings into standard SARIF v2.1.0 (Static Analysis Results Interchange Format) JSON reports.

License 许可
AGPL-3.0
最近更新
2026-11-14
Stars
★ 25
Forks
9

01 前言 Front Matter

name
sarif-exporter
owner
security-expert
scope
co-security
status
active
version
1.1.0
metadata
{ "type": "security-reporting", "triggers": [ "sarif-exporter", "/sarif-exporter", "sarif export", "export sarif report", "sarif format" ] }
relates_to
[ { "type": "follows", "skill": "samm-maturity" }, { "type": "composes_with", "skill": "stride-threat-matrix" } ]
description
Exports security scan results, threat matrices, and vulnerability findings into standard SARIF v2.1.0 (Static Analysis Results Interchange Format) JSON reports.
l2_propagate
true
last_reviewed
1793491200000
prerequisites
Security scan findings, threat matrix assessments, or raw vulnerability objects

03 SKILL.md 正文

📊 Skill: sarif-exporter

Context

Interoperability between security scanning tools, threat matrix modeling, and modern security management platforms (such as GitHub Code Scanning, DefectDojo, and CI/CD reporting dashboards) requires a standardized reporting format.

sarif-exporter defines rules, specifications, and execution patterns for serializing vulnerability findings, static analysis results, secret detection alerts, and DREAD threat matrix outputs into valid OASIS SARIF v2.1.0 (Static Analysis Results Interchange Format) JSON files.

When to Use

  • Serializing security scan outputs (security-scan, static analysis, secret detection) into standardized JSON reports.
  • Exporting reconciled findings - run finding-reconciliation first to merge duplicate scan hits, so the exported report contains one result per true finding.
  • Exporting threat findings and DREAD risk matrices generated by stride-threat-matrix for dashboard ingestion.
  • Integrating security audit artifacts into CI/CD pipelines (e.g. GitHub Actions Code Scanning uploads).
  • Converting custom security rule violations into OASIS-compliant SARIF structures.

Execution Steps

  1. Finding Collection & Normalization

    • Extract findings from scanners, audit scripts, or threat matrices.
    • Normalize finding properties: rule ID, rule name, full description, severity rating, file location, start line, start column, and remediation guidance.
  2. Severity Mapping to SARIF Levels Map internal or DREAD severity levels to standard SARIF level properties:

    • Critical / High (DREAD $\ge 6.0$): SARIF level: "error"
    • Medium (DREAD 4.0 - 5.9): SARIF level: "warning"
    • Low (DREAD $< 4.0$): SARIF level: "note"
    • Informational / Pass: SARIF level: "none"
  3. SARIF v2.1.0 Object Construction Construct the root JSON object following schema $schema: "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json":

    • $schema: URI pointing to official SARIF 2.1.0 JSON schema.
    • version: "2.1.0"
    • runs: Array containing tool execution metadata (tool.driver.name, tool.driver.version, tool.driver.rules) and results list.
  4. Location Reference Formatting

    • Format target file paths as relative URIs using forward slashes (file.path or scripts/audit.ts).
    • Specify physicalLocation.artifactLocation.uri and physicalLocation.region (startLine, startColumn, endLine, endColumn).
  5. Report Serialization & Validation

    • Serialize formatted JSON structure to destination path (e.g. reports/security-scan.sarif).
    • Validate JSON syntax and required SARIF schema fields before completing export.

Output Format

{
  "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
  "version": "2.1.0",
  "runs": [
    {
      "tool": {
        "driver": {
          "name": "ai-workspace-{{PROJECT_NAME}}-exporter",
          "version": "1.0.0",
          "rules": [
            {
              "id": "SEC-STRIDE-001",
              "name": "ElevationOfPrivilege",
              "shortDescription": {
                "text": "Unauthenticated CLI invocation vulnerability"
              },
              "fullDescription": {
                "text": "The command processor accepts unauthenticated calls over internal IPC sockets without signature verification."
              },
              "help": {
                "text": "Enforce verify-authorization gate before executing CLI command dispatches."
              },
              "properties": {
                "security-severity": "8.2"
              }
            }
          ]
        }
      },
      "results": [
        {
          "ruleId": "SEC-STRIDE-001",
          "level": "error",
          "message": {
            "text": "Elevation of privilege vulnerability detected in Command Processor with DREAD score 8.2."
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "scripts/dispatch.ts"
                },
                "region": {
                  "startLine": 45,
                  "startColumn": 1
                }
              }
            }
          ]
        }
      ]
    }
  ]
}

Co-develop Integration Note

This file is the hub-doctrine canonical for the co-security assurance suite (spec 2026-11-01-hub-consolidation-design, Phase 1 batch C). Co-security engagements run it as written. A co-develop pipeline instance derives from this doctrine by substituting the bindings below — the derivation never edits frontmatter: owner: security-expert stays single-valued here, and the co-develop ownership binding lives in this note only.

Parameterization — unfilled placeholders resolve to the co-security doctrine defaults; a co-develop derivation substitutes the bindings:

Placeholder Instance Unfilled default (co-security) Co-develop binding
{{PROJECT_NAME}} Output Format, tool.driver.name co-security co-develop

Co-develop bindings beyond placeholders:

  • Ownership: co-develop renders this skill as owned by security-monitor (its Phase 0/5 scan exporter). Frontmatter here stays owner: security-expert.
  • Related Skills: co-develop omits the verify-authorization entry — that pre-flight gate is a co-security engagement skill not adopted in the co-develop pipeline (authorization there is the pipeline's own Phase 0/5 security-monitor scan gates). The example rule's help text is likewise doctrine-fixed.
  • Delivery: the co-develop fork carries scope: common; this canonical keeps scope: co-security.

Related Skills

  • stride-threat-matrix — generates threat findings and DREAD scores converted to SARIF by this skill.
  • verify-authorization — mandatory pre-flight gate for running security assessment and exporting reports.
  • security-scan — produces secret detection and SAST findings ingested into SARIF reports.

04 同仓库更多 Skills

5throck
5throck/ai-workspace-standards

i18n-layout

Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.

★ 25
5throck
5throck/ai-workspace-standards

i18n-layout

Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.

★ 25
5throck
5throck/ai-workspace-standards

i18n-layout

Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.

★ 25
5throck
5throck/ai-workspace-standards

i18n-layout

Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.

★ 25
5throck
5throck/ai-workspace-standards

i18n-layout

Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.

★ 25
5throck
5throck/ai-workspace-standards

i18n-layout

Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL/bidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF/BOM issues surface.

★ 25