github-actions — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited github-actions (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Dispatch to: devops-automator agent.
Reference: https://github.com/actions/starter-workflows
name: CI
on: <trigger> # when to run
jobs:
job-name:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # reusable action
- run: npm test # shell commandKey fields: on, jobs.<id>.runs-on, steps[].uses, steps[].run, steps[].with, steps[].env.
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 9 * * 1' # Mondays 9am UTC
workflow_dispatch: # manual "Run workflow" button.github/workflows/ci.yml
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm # built-in cache — no extra step needed
- run: npm ci
- run: npm run typecheck --if-present
- run: npm run lint --if-present
- run: npm test --if-present
- run: npm run build --if-presentsetup-node@v4 with cache: npm handles node_modules caching automatically. Saves ~60% of install time.
.github/workflows/python-ci.yml
name: Python CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install flake8 pytest
- name: Lint
run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test
run: pytestsetup-python@v5 with cache: pip caches the pip download cache. Saves ~70% of install time.
Add in: GitHub repo → Settings → Secrets and variables → Actions → New repository secret.
Reference in steps:
- name: Deploy
env:
API_KEY: ${{ secrets.MY_API_KEY }}
run: ./deploy.shOr pass to an action:
- uses: some-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }} # built-in, always availableNever echo secrets. GitHub redacts them in logs but avoid echo ${{ secrets.X }}.
- name: Cache node_modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-Use this for monorepos or custom install paths. For standard npm/pip/yarn, prefer the built-in cache: param in setup-node/setup-python.
After CI is green: GitHub repo → Settings → Branches → Add rule → branch name: main.
Check:
ci (20.x, ubuntu-latest))Status check names match jobs.<id> in the workflow, suffixed with matrix values.
Define once in .github/workflows/shared-ci.yml:
on:
workflow_call:
inputs:
node-version:
required: false
type: string
default: '20.x'
secrets:
SLACK_WEBHOOK:
required: false
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: npm
- run: npm ci && npm testCall from another workflow:
jobs:
run-ci:
uses: ./.github/workflows/shared-ci.yml
with:
node-version: '22.x'
secrets:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - name: Notify Slack on failure
if: failure()
uses: slackapi/slack-github-action@v2
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"text": "CI failed on `${{ github.repository }}` branch `${{ github.ref_name }}`",
"attachments": [{
"color": "danger",
"text": "Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}]
}Add SLACK_WEBHOOK_URL as a repo secret (Incoming Webhook URL from Slack app settings).
strategy:
fail-fast: false # don't cancel other matrix jobs on first failure
matrix:
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
node-version: 18.xEach combination becomes a separate job. Status checks are named per combination.
.github/workflows/actions/checkout@v4 as first stepsetup-node/setup-python cache: param${{ secrets.X }}if: failure()~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.