Repository navigation
docs(ci-standards): feature-ideation backlog enhancement (backfill) + dry-run #2709
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CI pipeline for the .github standards repository. | |
| # Lints markdown, YAML, GitHub Actions, shell scripts, and runs AgentShield. | |
| # Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: {} | |
| concurrency: | |
| group: ci-${{ github.ref }}-${{ github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Lint Markdown | |
| uses: DavidAnson/markdownlint-cli2-action@ded1f9488f68a970bc66ea5619e13e9b52e601cd # v23.2.0 | |
| with: | |
| globs: '**/*.md' | |
| # if: always() — run every lint sub-step regardless of prior failures so PR | |
| # authors see every lint issue in one CI run instead of fix→push→discover | |
| # one more in the next run. The job still fails if any sub-step fails, so | |
| # the `Lint` status check (referenced by branch protection) is unchanged. | |
| - name: Lint YAML | |
| if: always() | |
| run: | | |
| pip install --quiet yamllint | |
| yamllint -c <(cat <<'YAMLLINTRC' | |
| extends: default | |
| rules: | |
| line-length: | |
| max: 200 | |
| truthy: | |
| check-keys: false | |
| document-start: disable | |
| comments: | |
| min-spaces-from-content: 1 | |
| YAMLLINTRC | |
| ) .github/workflows/ standards/workflows/ standards/dependabot/ | |
| - name: Lint GitHub Actions | |
| if: always() | |
| run: | | |
| # Install actionlint via verified download (pinned version + checksum) | |
| ACTIONLINT_VERSION="1.7.7" | |
| ACTIONLINT_SHA="023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757" | |
| curl -sLo actionlint.tar.gz "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" | |
| echo "${ACTIONLINT_SHA} actionlint.tar.gz" | sha256sum -c - | |
| tar xzf actionlint.tar.gz actionlint | |
| chmod +x actionlint | |
| rm actionlint.tar.gz | |
| # Lint our own workflow files (fail on errors, ignore shellcheck style hints) | |
| # `job_workflow_sha` is a valid reusable-workflow context property; actionlint 1.7.7 schema omits it | |
| ./actionlint -ignore 'SC2129' -ignore '"job_workflow_sha" is not defined' .github/workflows/*.yml | |
| # Template workflows use placeholder expressions — informational only | |
| ./actionlint -ignore 'context' standards/workflows/*.yml || true | |
| shellcheck: | |
| name: ShellCheck | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Run ShellCheck | |
| run: | | |
| # Recurse so subdirectories like scripts/lib/ (sourceable libraries) | |
| # are linted too. -x follows `# shellcheck source=...` directives. | |
| shopt -s globstar nullglob | |
| shell_files=(scripts/**/*.sh) | |
| if [ ${#shell_files[@]} -gt 0 ]; then | |
| shellcheck --severity=warning -x "${shell_files[@]}" | |
| else | |
| echo "No shell scripts found — skipping" | |
| fi | |
| agent-security: | |
| name: Agent Security Scan | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '20' | |
| - name: Run AgentShield | |
| run: | | |
| npx ecc-agentshield scan --path . --format json --min-severity high | |
| secret-scan: | |
| name: Secret scan (gitleaks) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout (full history) | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install gitleaks | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release download v8.30.1 --repo gitleaks/gitleaks --pattern 'gitleaks_8.30.1_linux_x64.tar.gz' --output /tmp/gitleaks.tar.gz | |
| echo "551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb /tmp/gitleaks.tar.gz" | sha256sum -c | |
| tar -xzf /tmp/gitleaks.tar.gz -C /tmp gitleaks | |
| sudo mv /tmp/gitleaks /usr/local/bin/gitleaks | |
| - name: Run gitleaks | |
| run: gitleaks detect --source . --redact --verbose --exit-code 1 |