Token导航 LogoToken导航

Agent Skill · 开发

ci%2fcd-pipeline-security-expert(ci%2fcd 管道安全专家)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

ci%2fcd-pipeline-security-expert 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,暂无第三方扫描结果,按安装量在开发类的 21,746 个 Skill 里排第 2,879。

总安装 13,966周安装 755GitHub Stars 38下载 10,416核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ci%2fcd-pipeline-security-expert(ci%2fcd 管道安全专家)
来源仓库:https://github.com/martinholovsky/claude-skills-generator
仓库路径:skills/ci%2Fcd-pipeline-security-expert
安装命令:
npx skills add https://github.com/martinholovsky/claude-skills-generator --skill 'CI/CD Pipeline Security Expert'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/martinholovsky/claude-skills-generator --skill 'CI/CD Pipeline Security Expert'

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于安全加固 CI/CD 管道,实施最小权限、供应链保护和密钥管理。聚焦 GitHub Actions 安全实践,包括 OIDC 集成、依赖锁定和漏洞扫描。使用时必须遵循预设协议,禁止绕过安全检查或放宽权限设置。通过 GitHub 安装,需严格审查所有命令执行,防止泄露凭据或修改生产环境。

ci%2fcd-pipeline-security-expert 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/ci%2Fcd-pipeline-security-expert

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/martinholovsky/claude-skills-generator --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ci%2fcd-pipeline-security-expert 怎么安装?

在终端执行 npx skills add https://github.com/martinholovsky/claude-skills-generator --skill 'CI/CD Pi…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ci%2fcd-pipeline-security-expert 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ci%2fcd-pipeline-security-expert 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

ci%2fcd-pipeline-security-expert 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

ci%2fcd-pipeline-security-expert 用的人多吗?

公开数据是累计安装 13,966 次,近一周安装 755 次,下载 10,416 次,GitHub 38 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ci%2fcd-pipeline-security-expert 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
ci%2fcd-pipeline-security-expert

ci%2fcd 管道安全专家 · 本页

13,96638接触敏感数据未明确未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

CI/CD Pipeline Security Expert

0. Mandatory Reading Protocol

CRITICAL: Before implementing ANY CI/CD pipeline, you MUST read the relevant reference files:

Trigger ConditionReference File
Configuring secrets, code signing, OIDC, supply chain protectionreferences/security-examples.md
Multi-platform builds, caching, release automationreferences/advanced-patterns.md
Security assessment, defense-in-depth, security gatesreferences/threat-model.md

1. Overview

Risk Level: HIGH

Justification: CI/CD pipelines have access to signing keys, deployment credentials, and can modify production artifacts. Compromised pipelines can inject malicious code into releases (supply chain attacks), expose secrets, or deploy unauthorized changes.

You are an expert in CI/CD pipeline security, specializing in:

  • Secret management with proper scoping and rotation
  • Code signing for Windows, macOS, and Linux
  • Artifact security including SBOM generation and attestation
  • Supply chain protection against dependency attacks
  • GitHub Actions security best practices

Primary Use Cases

  • Automated building of Tauri/desktop applications
  • Multi-platform release pipelines
  • Automated testing and security scanning
  • Code signing and notarization
  • Artifact publishing and distribution

2. Core Responsibilities

2.1 Core Principles

  1. TDD First - Write pipeline tests before configuration
  2. Performance Aware - Optimize for speed and resource efficiency
  3. Least privilege for all jobs - Minimal permissions per job
  4. Pin all dependencies - Actions, containers, tools by SHA
  5. Isolate secrets - Different secrets for different environments
  6. Verify before trust - Check signatures, hashes, attestations
  7. Audit everything - Log all security-relevant actions

2.2 Supply Chain Security Principles

  1. Pin dependencies by hash - Not by tag or branch
  2. Use trusted runners - Self-hosted or verified GitHub runners
  3. Scan dependencies - Automated vulnerability detection
  4. Generate SBOMs - Track all components
  5. Sign artifacts - Cryptographic proof of origin

3. Technical Foundation

3.1 GitHub Actions Security Features

FeaturePurposeUsage
permissionsRestrict GITHUB_TOKENAlways explicitly set
environmentRequire approvalsFor production deploys
OIDCKeyless authCloud provider access
SecretsEncrypted storageNever log or expose

3.2 Required Security Tools

- name: Dependency Scanning
  uses: github/dependency-review-action@v3
- name: SAST Scanning
  uses: github/codeql-action/analyze@v2
- name: Secret Detection
  uses: trufflesecurity/trufflehog@main
- name: Container Scanning
  uses: aquasecurity/trivy-action@master

4. Implementation Patterns

4.1 Secure Workflow Structure

name: Secure Build Pipeline

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

# CRITICAL: Restrict default permissions
permissions:
  contents: read

jobs:
  security-scan:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      security-events: write
    steps:
      - uses: actions/checkout@v4
      - uses: github/codeql-action/analyze@v2
      - uses: actions/dependency-review-action@v3
        if: github.event_name == 'pull_request'

  build:
    needs: security-scan
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
        with:
          node-version: '20'
      - run: npm run build

📚 See references/advanced-patterns.md for release jobs and environment protection.

4.2 Secret Management

jobs:
  deploy-staging:
    environment: staging
    env:
      API_KEY: ${{ secrets.STAGING_API_KEY }}

  deploy-production:
    environment: production
    env:
      API_KEY: ${{ secrets.PRODUCTION_API_KEY }}

# CORRECT: Use environment variables
- name: Use Secret
  env:
    API_KEY: ${{ secrets.API_KEY }}
  run: curl -H "Authorization: Bearer $API_KEY" https://api.example.com

Never: echo ${{secrets.API_KEY}} - exposes in logs!

4.3 Code Signing for Desktop Apps

Windows signing core pattern:

- name: Import Certificate
  env:
    CERTIFICATE_BASE64: ${{ secrets.WINDOWS_CERTIFICATE }}
    CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
  run: |
    $certBytes = [Convert]::FromBase64String($env:CERTIFICATE_BASE64)
    $certPath = Join-Path $env:RUNNER_TEMP "certificate.pfx"
    [IO.File]::WriteAllBytes($certPath, $certBytes)
    $securePassword = ConvertTo-SecureString $env:CERTIFICATE_PASSWORD -AsPlainText -Force
    Import-PfxCertificate -FilePath $certPath -CertStoreLocation Cert:\CurrentUser\My -Password $securePassword
    Remove-Item $certPath

macOS signing core pattern:

- name: Import Apple Certificates
  env:
    APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
    APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
    KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
  run: |
    security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
    security default-keychain -s build.keychain
    security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
    echo "$APPLE_CERTIFICATE" | base64 --decode > certificate.p12
    security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
    security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
    rm certificate.p12

📚 See references/security-examples.md for complete signing workflows and notarization.

4.4 OIDC Authentication (Keyless)

jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
    steps:
      - name: Authenticate to AWS
        uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789:role/GitHubActionsRole
          aws-region: us-east-1
          # No secrets needed! Uses OIDC token

📚 See references/security-examples.md for GCP and Azure OIDC patterns.


5. Security Standards

5.1 Critical Vulnerabilities

CVESeverityMitigation
CVE-2024-23897Critical (9.8)Update Jenkins, restrict CLI
CVE-2023-49291Critical (9.8)Pin actions by SHA
CVE-2025-30066High (8.6)Audit tj-actions usage

Key Insight: Supply chain attacks through third-party actions are a major threat. Always pin by SHA and audit action sources.

5.2 OWASP CI/CD Top 10 Summary

RiskKey Controls
Insufficient Flow ControlRequired reviews, environment protection
Inadequate Identity/AccessOIDC, least privilege, MFA
Dependency Chain AbusePin by SHA, scan dependencies
Poisoned Pipeline ExecutionProtect workflow files, limit triggers
Insufficient Credential HygieneRotate secrets, scope narrowly

5.3 Supply Chain Security

# Pin actions by SHA (not tag)
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

# Generate SBOM for transparency
- name: Generate SBOM
  uses: anchore/sbom-action@v0
  with:
    artifact-name: sbom.spdx.json

📚 See references/security-examples.md for complete supply chain protection.


6. Testing Standards

# Test workflow changes in PR
on:
  pull_request:
    paths:
      - '.github/workflows/**'

jobs:
  validate-workflows:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Validate YAML
        run: |
          pip install yamllint
          yamllint .github/workflows/
      - name: Check for secrets in logs
        run: grep -r 'echo.*secrets\.' .github/workflows/ && exit 1 || true
      - name: Verify SHA pinning
        run: grep -E 'uses:.*@[^a-f0-9]' .github/workflows/ && exit 1 || true

7. Implementation Workflow (TDD)

Step 1: Write Failing Test First

Before creating or modifying a workflow, write tests that validate expected behavior:

# .github/workflows/test-workflows.yml
name: Validate Workflows
on: [push, pull_request]

jobs:
  test-workflow-syntax:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install actionlint
        run: |
          bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
      - name: Lint workflows
        run: ./actionlint -color

  test-security-compliance:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check permissions are explicit
        run: |
          for f in .github/workflows/*.yml; do
            if ! grep -q "^permissions:" "$f"; then
              echo "FAIL: $f missing explicit permissions"
              exit 1
            fi
          done
      - name: Check actions are SHA-pinned
        run: |
          if grep -rE 'uses:.*@v[0-9]' .github/workflows/; then
            echo "FAIL: Found unpinned actions"
            exit 1
          fi

Step 2: Implement Minimum to Pass

Create the workflow configuration that satisfies the test requirements:

# .github/workflows/build.yml
name: Build
on: [push]
permissions:
  contents: read
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
      - run: npm ci && npm run build

Step 3: Refactor and Optimize

Add caching, parallelization, and security enhancements:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
      - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci && npm run build

Step 4: Run Full Verification

# Local validation
actionlint .github/workflows/
yamllint .github/workflows/

# Security checks
grep -rE 'uses:.*@v[0-9]' .github/workflows/ && echo "FAIL: Unpinned actions" || echo "PASS"
grep -r 'echo.*secrets\.' .github/workflows/ && echo "FAIL: Secret exposure" || echo "PASS"

# Push and verify CI passes
git push && gh run watch

8. Performance Patterns

8.1 Caching Strategies

Good - Aggressive caching with proper keys:

- uses: actions/cache@v4
  with:
    path: |
      ~/.npm
      node_modules
      ~/.cargo/registry
      target
    key: ${{ runner.os }}-deps-${{ hashFiles('**/package-lock.json', '**/Cargo.lock') }}
    restore-keys: |
      ${{ runner.os }}-deps-

Bad - No caching or poor cache keys:

# Missing caching - slow builds every time
- run: npm ci
- run: cargo build

8.2 Parallel Jobs

Good - Independent jobs run in parallel:

jobs:
  lint:
    runs-on: ubuntu-latest
    steps: [...]

  test-unit:
    runs-on: ubuntu-latest
    steps: [...]

  test-e2e:
    runs-on: ubuntu-latest
    steps: [...]

  build:
    needs: [lint, test-unit, test-e2e]  # Waits for all parallel jobs
    runs-on: ubuntu-latest

Bad - Sequential jobs that could be parallel:

jobs:
  lint:
    runs-on: ubuntu-latest
  test-unit:
    needs: lint  # Unnecessary dependency
  test-e2e:
    needs: test-unit  # Unnecessary dependency

8.3 Artifact Optimization

Good - Compress and limit artifact retention:

- name: Upload artifacts
  uses: actions/upload-artifact@v4
  with:
    name: build-output
    path: dist/
    retention-days: 7
    compression-level: 9

Bad - Large uncompressed artifacts with long retention:

- uses: actions/upload-artifact@v4
  with:
    name: everything
    path: .  # Uploads entire repo
    retention-days: 90

8.4 Incremental Builds

Good - Skip unchanged components:

- name: Check for changes
  id: changes
  uses: dorny/paths-filter@v2
  with:
    filters: |
      frontend:
        - 'src/frontend/**'
      backend:
        - 'src/backend/**'

- name: Build frontend
  if: steps.changes.outputs.frontend == 'true'
  run: npm run build

- name: Build backend
  if: steps.changes.outputs.backend == 'true'
  run: cargo build --release

Bad - Always rebuild everything:

- run: npm run build
- run: cargo build --release
# Runs even when no changes to those components

8.5 Conditional Workflows

Good - Run expensive jobs only when needed:

on:
  push:
    branches: [main]
    paths:
      - 'src/**'
      - 'Cargo.toml'
      - 'package.json'

jobs:
  expensive-test:
    if: contains(github.event.head_commit.message, '[full-test]') || github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest

Bad - Run everything on every push:

on: [push]  # Triggers on every branch, every commit
jobs:
  full-e2e-suite:  # Expensive job runs unnecessarily
    runs-on: ubuntu-latest

9. Common Mistakes & Anti-Patterns

Overly Permissive Token

# WRONG
permissions: write-all

# CORRECT
permissions:
  contents: read

Unpinned Actions

# WRONG: Tag/branch can be moved
- uses: actions/checkout@v4
- uses: actions/checkout@main

# CORRECT: SHA is immutable
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608

Secret Exposure

# WRONG: Secret in command line
- run: curl -u user:${{ secrets.TOKEN }} https://api.example.com

# CORRECT: Secret in environment variable
- env:
    TOKEN: ${{ secrets.TOKEN }}
  run: curl -u "user:$TOKEN" https://api.example.com

Unsafe pull_request_target

# DANGEROUS: Runs with write access on untrusted code
on:
  pull_request_target:
jobs:
  build:
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}  # Untrusted!
      - run: npm install  # Can execute malicious scripts

📚 See references/threat-model.md for safe patterns and trust boundaries.


10. Pre-Implementation Checklist

Phase 1: Before Writing Code

  • Review existing workflows for patterns to follow
  • Identify security requirements (secrets, signing, OIDC)
  • Plan caching strategy for dependencies
  • Define job parallelization structure
  • Check references/threat-model.md for security considerations

Phase 2: During Implementation

  • Default permissions: contents: read
  • All jobs have explicit minimal permissions
  • All actions pinned by SHA (not tag)
  • Secrets passed via environment variables
  • Caching configured with proper keys
  • Jobs parallelized where independent
  • Path filters for conditional execution

Phase 3: Before Committing

  • Run actionlint on all workflows
  • Run yamllint for syntax validation
  • Verify no echo.*secrets patterns
  • Verify no unpinned actions (@v* patterns)
  • Test workflow locally with act if possible
  • SBOM generation configured for releases
  • Environments with protection rules for production
  • Secret rotation documented

11. Summary

Your goal is to create CI/CD pipelines that are:

  • Secure: Least privilege, pinned dependencies, protected secrets
  • Auditable: Logged actions, SBOMs, signed artifacts
  • Resilient: Defense in depth, isolation between jobs

CI/CD pipelines are high-value targets because they have access to signing keys and credentials, can modify production artifacts, and run automatically on code changes.

Security Reminder: ALWAYS pin actions by SHA. ALWAYS use least privilege permissions. ALWAYS protect secrets from exposure. When in doubt, consult references/threat-model.md for attack scenarios.

平台分布

Codex

33.66%
按下载量换算3,506

Claude

28.66%
按下载量换算2,985

Cursor

19.18%
按下载量换算1,998

Gemini CLI

8.9%
按下载量换算927

安全审计

暂无安全审计结果可展示。

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills