AGENT SKILL

x-generate-security-pipeline

Generate CI/CD pipeline configurations with conditional security stages based on SecurityConfig flags. Support GitHub Actions, GitLab CI, and Azure DevOps with minimal and full stage modes, configurable severity thresholds, and SARIF artifact upload.

License 许可
MIT
最近更新
2026-10-27
Stars
★ 0
Forks
1

01 前言 Front Matter

name
x-generate-security-pipeline
description
Generate CI/CD pipeline configurations with conditional security stages based on SecurityConfig flags. Support GitHub Actions, GitLab CI, and Azure DevOps with minimal and full stage modes, configurable severity thresholds, and SARIF artifact upload.
allowed-tools
Read, Write, Edit, Glob, Grep, Bash, Agent
argument-hint
[--ci github|gitlab|azure] [--stages all|minimal] [--trigger push|pr|schedule] [--fail-on-findings true|false] [--severity-threshold CRITICAL|HIGH|MEDIUM]
context-budget
light
user-invocable
true
requires-capabilities
[]

02 资源文件 2

03 SKILL.md 正文

Global Output Policy

  • Language: English ONLY.
  • Tone: Technical, Direct, and Concise.
  • Efficiency: Remove all conversational fillers and greetings to save tokens.

Triggers

/x-generate-security-pipeline                          — GitHub Actions, all stages, pr trigger (default)
/x-generate-security-pipeline --ci github              — GitHub Actions security pipeline
/x-generate-security-pipeline --ci gitlab              — GitLab CI security pipeline
/x-generate-security-pipeline --ci azure               — Azure DevOps security pipeline
/x-generate-security-pipeline --stages minimal         — SAST + secret scan + dependency audit only
/x-generate-security-pipeline --stages all             — full pipeline with all 9 conditional stages
/x-generate-security-pipeline --trigger schedule       — scheduled trigger

Parameters

Parameter Type Default Description
--ci Enum github CI platform: github (GitHub Actions), gitlab (GitLab CI), azure (Azure DevOps)
--stages Enum all Stage mode: all (9 conditional stages) or minimal (3 stages: SAST, secret scan, dependency audit)
--trigger Enum pr Pipeline trigger: push, pr, schedule
--fail-on-findings Boolean true Exit non-zero when findings at or above severity threshold detected
--severity-threshold Enum HIGH Minimum severity to fail: CRITICAL, HIGH, MEDIUM

Output Contract

Platform Output File
github .github/workflows/security.yml
gitlab .gitlab-ci.yml (security stages appended)
azure azure-pipelines-security.yml

All platforms support SARIF artifact upload for GitHub Advanced Security integration. Each enabled stage is a CI job wrapping the corresponding atomic scanning skill reference (RULE-011 — Composability). 9 stages available; conditions and skill references:

Stage Skill Condition
Secret Scan x-scan-secrets security.scanning.secrets = true
SAST x-run-sast security.scanning.sast = true
Dependency Audit x-audit-dependencies Always
SonarQube x-run-sonar-security security.scanning.sonar = true
Container Scan x-scan-container-security infrastructure.container != none
DAST Passive x-run-dast security.scanning.dast = true
OWASP Scan x-scan-owasp security.frameworks contains "owasp"
Hardening Eval x-evaluate-hardening security.scanning.hardening = true
Quality Gate x-run-sonar-security security.scanning.sonar = true

Error Envelope

Scenario Action
Unknown CI platform Default to github; warn user
No SecurityConfig flags set Generate Dependency Audit only (always enabled)
All conditions disabled Generate pipeline with only Dependency Audit
Container scan without Dockerfile Exclude container scan; add to disabledStages
Invalid --severity-threshold Default to HIGH; warn user
Invalid --stages mode Default to all; warn user
Validation tool missing Warn and skip validation (non-blocking)

Full Protocol

Complete per-platform YAML templates (GitHub Actions, GitLab CI, Azure DevOps), stage-by-stage configuration details (SecurityConfig key→stage mapping, SARIF upload for each platform, caching strategies), severity threshold semantics, tool mapping (Semgrep for SAST, Trivy for container scan, Syft/Grype for dependency audit, detect-secrets for secret scan), composability notes (RULE-011), and integration notes in references/full-protocol.md.

04 同仓库更多 Skills

review-bench
review-bench/edercnj_ia-dev-environment

x-parallel-eval

Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan / x-story-plan, applies the parallelism-heuristics knowledge pack (hard / regen / soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

parallelism-heuristics

Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard / regen / soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-watch-pr-ci

Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-validate-docs

Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared/auto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-system-architecture

Incrementally updates docs/architecture/system.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component/integration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.

★ 0
review-bench
review-bench/edercnj_ia-dev-environment

x-update-architecture

Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.

★ 0