mirror of
https://github.com/storytold/craft-ai-integrations.git
synced 2026-11-20 19:20:41 +01:00
Mutable action tags are a supply-chain risk: a moved tag runs different code without a diff. Every workflow action is now pinned through .github/workflows/actions.lock, and CI verifies the lockfile so an out-of-sync or tampered one fails instead of running.
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Deliberate-bug checks
|
|
|
|
# Run by hand from the Actions tab. Each case breaks one safety rule on purpose and checks that a
|
|
# test notices (see tools/mutation/README.md). It is slow, so it does not run on every push.
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
group:
|
|
description: Case group to run, for example u3 or u4
|
|
required: true
|
|
default: u3
|
|
filter:
|
|
description: Only run cases whose name contains this text (optional)
|
|
required: false
|
|
default: ""
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
mutation:
|
|
name: ${{ inputs.group }} (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 120
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
steps:
|
|
- name: Harden runner
|
|
uses: step-security/harden-runner@v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- uses: actions/checkout@v7.0.1
|
|
- uses: step-security/dtolnay-rust-toolchain@v1.0.0
|
|
with:
|
|
toolchain: stable
|
|
- uses: step-security/rust-cache@v2.9.2
|
|
- name: Run ${{ inputs.group }} deliberate-bug checks
|
|
env:
|
|
GROUP: ${{ inputs.group }}
|
|
FILTER: ${{ inputs.filter }}
|
|
run: |
|
|
set -eu
|
|
if [ -n "$FILTER" ]; then
|
|
python3 tools/mutation/mutation_check.py "$GROUP" "$FILTER"
|
|
else
|
|
python3 tools/mutation/mutation_check.py "$GROUP"
|
|
fi
|