[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2FSG9D9KCB2W0Y3M1XEV6":3,"skill-same:01M6C2FSG9D9KCB2W0Y3M1XEV6":156},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":59,"linkOnly":60,"markdownContent":61,"markdownBody":62,"frontMatter":63,"refName":97,"commitSha":98,"skillDirectory":99,"forksCount":100,"repositoryHtmlUrl":101,"repositoryHomepageUrl":102,"ownerHtmlUrl":103,"ownerBlogUrl":104,"ownerDescription":105,"updatedAt":106,"install":107,"resources":120},"01M6C2FSG9D9KCB2W0Y3M1XEV6","sanitizer-in-ci","CI 运行时 sanitizer 构建","Detect language\u002Ftoolchain and emit CI job recipes that build with runtime sanitizers (ASan\u002FUBSan\u002FMSan\u002FTSan, race detectors, faulthandler)","检测语言\u002F工具链，并生成使用运行时 sanitizer（ASan\u002FUBSan\u002FMSan\u002FTSan、竞态检测器、faulthandler）进行构建的 CI 作业配方。","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fsanitizer-in-ci\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58],"sanitizer","sanitizer in ci","ci","gitlab ci","at","paste","recipes","project","files","ready","never","auto","coverage","write","read","directory","haiku","Bash","how","github actions","actions","run","cpp","gitlab","rust","security","go","review","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: sanitizer-in-ci\nplatforms: [all]\ndescription: Detect language\u002Ftoolchain and emit CI job recipes that build with runtime sanitizers (ASan\u002FUBSan\u002FMSan\u002FTSan, race detectors, faulthandler)\nrequires:\n  - toolchain: at least one supported language detected (C, C++, Rust, Go, Python, Node)\n  - ci-platform: known CI platform (Gitea Actions, GitHub Actions, GitLab CI) — auto-detected from .github\u002F.gitea\u002F.gitlab files\nensures:\n  - ci-recipe: emit ready-to-paste CI job(s) at .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002F{ci-platform}\u002F{language}.yaml\n  - suppression-template: emit a starter suppressions file for known acceptable false positives\n  - operator-guide: emit OPERATOR.md explaining what each sanitizer catches and how to triage findings\nerrors:\n  - no-supported-language: project has no language this skill can wire sanitizers for\n  - unknown-ci-platform: no recognizable CI directory; emit recipes for all three with a chooser note\ninvariants:\n  - never modifies existing CI files in place — always emits new files under .aiwg\u002F for operator review\n  - emitted recipes do NOT replace test runs; they ADD a parallel sanitizer-enabled run\nscript:\n  entrypoint: scripts\u002Femit.mjs\n  runtime: node\n  cwd: project-root\n  argsHint: \"[--language c|cpp|rust|go|python|node|auto] [--ci gitea|github|gitlab|auto] [--coverage]\"\ncommandHint:\n  argumentHint: \"[--language c|cpp|rust|go|python|node|auto] [--ci gitea|github|gitlab|auto] [--sanitizers asan,ubsan,msan,tsan,race,faulthandler] [--coverage]\"\n  allowedTools: Read, Write, Bash, Glob, Grep\n  model: haiku\n  category: security\n  orchestration: false\n  modelRole: efficiency\n  modelTier: economy\n---\n\n# Sanitizer in CI\n\n**You are the Sanitizer Integration Engineer** — detect what the project is built in, what its CI looks like, and emit recipes that wire compile-time sanitizers and runtime checkers into PR-gating jobs.\n\n## Core Philosophy\n\n\"Catch the class of bugs the type system doesn't.\" Sanitizers find memory safety violations, undefined behavior, races, and unsafe deserialization at test time — finding bugs months before they become CVEs. The cost is one extra CI job per language; the value is every memory-safety incident you don't have.\n\n## Natural Language Triggers\n\n- \"wire sanitizers into CI\"\n- \"add ASan to the build\"\n- \"enable UBSan\"\n- \"set up runtime checkers\"\n- \"race detector in CI\"\n\n## Language Coverage (cycle 1)\n\n| Language | Sanitizers | Notes |\n|----------|-----------|-------|\n| C \u002F C++  | ASan, UBSan, MSan, TSan | Compiler-driven; Clang preferred over GCC for breadth |\n| Rust     | `RUSTFLAGS=-Zsanitizer=...`, miri (interpreter-mode UB checks) | Nightly required for compile-time sanitizers; miri runs on stable |\n| Go       | `go test -race` (race detector), `go build -msan` (Linux\u002FAMD64 only) | Race detector is the default; MSan needs CGO |\n| Python   | `PYTHONFAULTHANDLER=1`, `-X dev`, `-W error` (warnings-as-errors) | Plus `pytest -W error::DeprecationWarning` |\n| Node.js  | `--use-strict`, `--throw-deprecation`, `--unhandled-rejections=strict`, `--experimental-vm-modules` | No memory sanitizer; rely on UB caught by V8 + strict-mode flags |\n\nCycle-2 additions targeted: Swift, Java\u002FJVM (HotSpot JFR + JNI checks), Ruby.\n\n## Execution Flow\n\n### Phase 1: Detect languages\n\nUse the shared detection helper:\n\n```bash\n# agentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Flib\u002Ftoolchain-detect.sh\ndetect_languages  # outputs newline-separated language codes\n```\n\nDetection signals (per language):\n\n- `c` — presence of `Makefile`, `CMakeLists.txt`, `*.c`\u002F`*.h` in src\n- `cpp` — `CMakeLists.txt` with `CXX`, `*.cpp`\u002F`*.cc`\u002F`*.hpp`, `meson.build`\n- `rust` — `Cargo.toml`\n- `go` — `go.mod`\n- `python` — `pyproject.toml`, `setup.py`, `requirements*.txt`\n- `node` — `package.json` with `dependencies` or `devDependencies`\n\n### Phase 2: Detect CI platform\n\n- `.github\u002Fworkflows\u002F` → GitHub Actions\n- `.gitea\u002Fworkflows\u002F` → Gitea Actions (same syntax as GitHub)\n- `.gitlab-ci.yml` → GitLab CI\n\nIf unclear, emit recipes for all three with a chooser comment.\n\n### Phase 3: Emit per-language recipes\n\nFor each detected language, write to `.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002F{ci-platform}\u002F{language}.yaml`.\n\nReference emitter:\n\n```bash\nagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fsanitizer-in-ci\u002Fscripts\u002Femit.sh \\\n  --language auto --ci auto\n```\n\n### Example: C\u002FC++ on Gitea\u002FGitHub Actions\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Fc.yaml\n# Add to your workflow OR copy into .github\u002Fworkflows\u002Fsanitizers.yml\nname: Sanitizers (C\u002FC++)\non:\n  pull_request:\n  push:\n    branches: [main]\n\njobs:\n  asan-ubsan:\n    runs-on: ubuntu-latest\n    container: node:24@sha256:050bf2bbe33c1d6754e060bec89378a79ed831f04a7bb1a53fe45e997df7b3bb  # 24.15.0\n    env:\n      CC: clang\n      CXX: clang++\n      CFLAGS: \"-O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all\"\n      CXXFLAGS: \"-O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all\"\n      LDFLAGS: \"-fsanitize=address,undefined\"\n      ASAN_OPTIONS: \"abort_on_error=1:print_stacktrace=1:halt_on_error=1:detect_leaks=1\"\n      UBSAN_OPTIONS: \"print_stacktrace=1:halt_on_error=1\"\n      LSAN_OPTIONS: \"suppressions=.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Flsan-suppressions.txt\"\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5  # v4.3.1\n      - name: Install clang\n        run: apt-get update && apt-get install -y clang make cmake\n      - name: Build with ASan + UBSan\n        run: |\n          # Adjust to your build system:\n          # cmake: cmake -B build && cmake --build build\n          # make:  make\n          make\n      - name: Run test suite under sanitizers\n        run: make test\n      - name: Upload sanitizer logs on failure\n        if: failure()\n        uses: actions\u002Fupload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882  # v4.4.3\n        with:\n          name: sanitizer-logs-c\n          path: |\n            build\u002FTesting\u002FTemporary\u002FLastTest.log\n            *.san.log\n\n  msan:\n    # MSan requires every dependency to be MSan-instrumented (including libc).\n    # Most projects find this prohibitively expensive — enable only if you can build deps from source.\n    runs-on: ubuntu-latest\n    if: false  # set to true if your build allows MSan-instrumented deps\n    # ... similar shape with -fsanitize=memory\n\n  tsan:\n    # TSan: thread races. Enable for multi-threaded code.\n    runs-on: ubuntu-latest\n    if: false  # enable for threaded projects\n    # ... similar shape with -fsanitize=thread\n```\n\n### Example: Rust\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Frust.yaml\nname: Sanitizers (Rust)\non: [pull_request, push]\n\njobs:\n  asan:\n    runs-on: ubuntu-latest\n    env:\n      RUSTFLAGS: \"-Zsanitizer=address\"\n      RUSTDOCFLAGS: \"-Zsanitizer=address\"\n      ASAN_OPTIONS: \"abort_on_error=1:halt_on_error=1\"\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - name: Install nightly toolchain\n        run: |\n          rustup toolchain install nightly --component rust-src\n          rustup default nightly\n      - name: Test with ASan\n        run: cargo +nightly test -Zbuild-std --target x86_64-unknown-linux-gnu\n\n  miri:\n    runs-on: ubuntu-latest\n    env:\n      MIRIFLAGS: \"-Zmiri-strict-provenance\"\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - name: Install miri\n        run: |\n          rustup toolchain install nightly --component miri\n          cargo +nightly miri setup\n      - name: Run miri\n        run: cargo +nightly miri test\n```\n\n### Example: Go\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Fgo.yaml\nname: Sanitizers (Go)\non: [pull_request, push]\n\njobs:\n  race-detector:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - uses: actions\u002Fsetup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b  # v5.4.0\n        with:\n          go-version-file: go.mod\n      - name: Test with race detector\n        run: go test -race -count=1 .\u002F...\n```\n\n### Example: Python\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Fpython.yaml\nname: Runtime Checks (Python)\non: [pull_request, push]\n\njobs:\n  faulthandler-and-warnings:\n    runs-on: ubuntu-latest\n    env:\n      PYTHONFAULTHANDLER: \"1\"\n      PYTHONDEVMODE: \"1\"  # equivalent to python -X dev\n      PYTHONWARNINGS: \"error\"  # warnings-as-errors\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - uses: actions\u002Fsetup-python@a26af69be951a213d495a4c3e4e4022e16d87065  # v5.6.0\n        with:\n          python-version-file: .python-version\n      - name: Install deps\n        run: pip install -e .[dev]\n      - name: Test with dev mode + faulthandler\n        run: pytest -W error\n```\n\n### Phase 4: Emit suppression files\n\nFor C\u002FC++, write `.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Flsan-suppressions.txt` with documented categories:\n\n```\n# LeakSanitizer suppressions\n# Each entry MUST have a reason comment. Unjustified entries are reviewed quarterly.\n\n# Third-party library known leak (upstream tracker: \u003Clink>)\n# leak:libfoo\n\n# OpenSSL one-time init leak — by design, lives until process exit\n# leak:OPENSSL_init_crypto\n```\n\n### Phase 5: Emit operator guide\n\n`.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002FOPERATOR.md`:\n\n```markdown\n# Sanitizer Operator Guide\n\n## What each sanitizer catches\n\n- **ASan (AddressSanitizer)**: heap\u002Fstack overflow, use-after-free, double-free, memory leaks\n- **UBSan (UndefinedBehaviorSanitizer)**: signed overflow, null deref, OOB shifts, misaligned reads\n- **MSan (MemorySanitizer)**: uninitialized memory reads\n- **TSan (ThreadSanitizer)**: data races, deadlocks\n- **Race (Go)**: data races in goroutines\n- **faulthandler (Python)**: segfaults in C extensions; emits Python tracebacks\n\n## Triage workflow\n\n1. Sanitizer fails in CI → download the log artifact\n2. Identify the access (e.g., `READ of size 4 at 0x...`)\n3. Match to source via the stack trace\n4. Decide: real bug → fix; false positive → suppression entry with link to upstream issue\n\n## Suppressions policy\n\nEvery suppression entry MUST cite a reason. Quarterly review removes obsolete ones.\n```\n\n## Composition\n\n- `dev-idempotent-builds.md` rule — sanitizer CI jobs MUST use pinned action SHAs and pinned container digests\n- `ci-action-pinning.md` rule — same\n- `fuzzing-in-ci` skill — complementary; fuzzing generates inputs that sanitizers then validate\n\n## Implementation Status\n\n- `scripts\u002Femit.sh` emits recipe files under `.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002F{ci-platform}\u002F`.\n- Recipes are starter templates; project-specific tuning is still required for build commands, dependencies, and suppression paths.\n- MSan\u002FTSan remain conditional because enabling them requires project-specific instrumentation of all dependencies.\n- OSS-Fuzz integration lives in `fuzzing-in-ci`, not here.\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Ffuzzing-in-ci\u002FSKILL.md — Companion fuzzing skill\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Flib\u002Ftoolchain-detect.sh — Shared detection\n- `.aiwg\u002Fsecurity\u002Fcurl-checklist-gap-analysis.md` row 14\n- AddressSanitizer: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanitizer\n- UBSan: https:\u002F\u002Fclang.llvm.org\u002Fdocs\u002FUndefinedBehaviorSanitizer.html\n- Rust sanitizers: https:\u002F\u002Fdoc.rust-lang.org\u002Fbeta\u002Funstable-book\u002Fcompiler-flags\u002Fsanitizer.html\n- Go race detector: https:\u002F\u002Fgo.dev\u002Fdoc\u002Farticles\u002Frace_detector\n","# Sanitizer in CI\n\n**You are the Sanitizer Integration Engineer** — detect what the project is built in, what its CI looks like, and emit recipes that wire compile-time sanitizers and runtime checkers into PR-gating jobs.\n\n## Core Philosophy\n\n\"Catch the class of bugs the type system doesn't.\" Sanitizers find memory safety violations, undefined behavior, races, and unsafe deserialization at test time — finding bugs months before they become CVEs. The cost is one extra CI job per language; the value is every memory-safety incident you don't have.\n\n## Natural Language Triggers\n\n- \"wire sanitizers into CI\"\n- \"add ASan to the build\"\n- \"enable UBSan\"\n- \"set up runtime checkers\"\n- \"race detector in CI\"\n\n## Language Coverage (cycle 1)\n\n| Language | Sanitizers | Notes |\n|----------|-----------|-------|\n| C \u002F C++  | ASan, UBSan, MSan, TSan | Compiler-driven; Clang preferred over GCC for breadth |\n| Rust     | `RUSTFLAGS=-Zsanitizer=...`, miri (interpreter-mode UB checks) | Nightly required for compile-time sanitizers; miri runs on stable |\n| Go       | `go test -race` (race detector), `go build -msan` (Linux\u002FAMD64 only) | Race detector is the default; MSan needs CGO |\n| Python   | `PYTHONFAULTHANDLER=1`, `-X dev`, `-W error` (warnings-as-errors) | Plus `pytest -W error::DeprecationWarning` |\n| Node.js  | `--use-strict`, `--throw-deprecation`, `--unhandled-rejections=strict`, `--experimental-vm-modules` | No memory sanitizer; rely on UB caught by V8 + strict-mode flags |\n\nCycle-2 additions targeted: Swift, Java\u002FJVM (HotSpot JFR + JNI checks), Ruby.\n\n## Execution Flow\n\n### Phase 1: Detect languages\n\nUse the shared detection helper:\n\n```bash\n# agentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Flib\u002Ftoolchain-detect.sh\ndetect_languages  # outputs newline-separated language codes\n```\n\nDetection signals (per language):\n\n- `c` — presence of `Makefile`, `CMakeLists.txt`, `*.c`\u002F`*.h` in src\n- `cpp` — `CMakeLists.txt` with `CXX`, `*.cpp`\u002F`*.cc`\u002F`*.hpp`, `meson.build`\n- `rust` — `Cargo.toml`\n- `go` — `go.mod`\n- `python` — `pyproject.toml`, `setup.py`, `requirements*.txt`\n- `node` — `package.json` with `dependencies` or `devDependencies`\n\n### Phase 2: Detect CI platform\n\n- `.github\u002Fworkflows\u002F` → GitHub Actions\n- `.gitea\u002Fworkflows\u002F` → Gitea Actions (same syntax as GitHub)\n- `.gitlab-ci.yml` → GitLab CI\n\nIf unclear, emit recipes for all three with a chooser comment.\n\n### Phase 3: Emit per-language recipes\n\nFor each detected language, write to `.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002F{ci-platform}\u002F{language}.yaml`.\n\nReference emitter:\n\n```bash\nagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fsanitizer-in-ci\u002Fscripts\u002Femit.sh \\\n  --language auto --ci auto\n```\n\n### Example: C\u002FC++ on Gitea\u002FGitHub Actions\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Fc.yaml\n# Add to your workflow OR copy into .github\u002Fworkflows\u002Fsanitizers.yml\nname: Sanitizers (C\u002FC++)\non:\n  pull_request:\n  push:\n    branches: [main]\n\njobs:\n  asan-ubsan:\n    runs-on: ubuntu-latest\n    container: node:24@sha256:050bf2bbe33c1d6754e060bec89378a79ed831f04a7bb1a53fe45e997df7b3bb  # 24.15.0\n    env:\n      CC: clang\n      CXX: clang++\n      CFLAGS: \"-O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all\"\n      CXXFLAGS: \"-O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all\"\n      LDFLAGS: \"-fsanitize=address,undefined\"\n      ASAN_OPTIONS: \"abort_on_error=1:print_stacktrace=1:halt_on_error=1:detect_leaks=1\"\n      UBSAN_OPTIONS: \"print_stacktrace=1:halt_on_error=1\"\n      LSAN_OPTIONS: \"suppressions=.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Flsan-suppressions.txt\"\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5  # v4.3.1\n      - name: Install clang\n        run: apt-get update && apt-get install -y clang make cmake\n      - name: Build with ASan + UBSan\n        run: |\n          # Adjust to your build system:\n          # cmake: cmake -B build && cmake --build build\n          # make:  make\n          make\n      - name: Run test suite under sanitizers\n        run: make test\n      - name: Upload sanitizer logs on failure\n        if: failure()\n        uses: actions\u002Fupload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882  # v4.4.3\n        with:\n          name: sanitizer-logs-c\n          path: |\n            build\u002FTesting\u002FTemporary\u002FLastTest.log\n            *.san.log\n\n  msan:\n    # MSan requires every dependency to be MSan-instrumented (including libc).\n    # Most projects find this prohibitively expensive — enable only if you can build deps from source.\n    runs-on: ubuntu-latest\n    if: false  # set to true if your build allows MSan-instrumented deps\n    # ... similar shape with -fsanitize=memory\n\n  tsan:\n    # TSan: thread races. Enable for multi-threaded code.\n    runs-on: ubuntu-latest\n    if: false  # enable for threaded projects\n    # ... similar shape with -fsanitize=thread\n```\n\n### Example: Rust\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Frust.yaml\nname: Sanitizers (Rust)\non: [pull_request, push]\n\njobs:\n  asan:\n    runs-on: ubuntu-latest\n    env:\n      RUSTFLAGS: \"-Zsanitizer=address\"\n      RUSTDOCFLAGS: \"-Zsanitizer=address\"\n      ASAN_OPTIONS: \"abort_on_error=1:halt_on_error=1\"\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - name: Install nightly toolchain\n        run: |\n          rustup toolchain install nightly --component rust-src\n          rustup default nightly\n      - name: Test with ASan\n        run: cargo +nightly test -Zbuild-std --target x86_64-unknown-linux-gnu\n\n  miri:\n    runs-on: ubuntu-latest\n    env:\n      MIRIFLAGS: \"-Zmiri-strict-provenance\"\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - name: Install miri\n        run: |\n          rustup toolchain install nightly --component miri\n          cargo +nightly miri setup\n      - name: Run miri\n        run: cargo +nightly miri test\n```\n\n### Example: Go\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Fgo.yaml\nname: Sanitizers (Go)\non: [pull_request, push]\n\njobs:\n  race-detector:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - uses: actions\u002Fsetup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b  # v5.4.0\n        with:\n          go-version-file: go.mod\n      - name: Test with race detector\n        run: go test -race -count=1 .\u002F...\n```\n\n### Example: Python\n\n```yaml\n# .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Fgithub\u002Fpython.yaml\nname: Runtime Checks (Python)\non: [pull_request, push]\n\njobs:\n  faulthandler-and-warnings:\n    runs-on: ubuntu-latest\n    env:\n      PYTHONFAULTHANDLER: \"1\"\n      PYTHONDEVMODE: \"1\"  # equivalent to python -X dev\n      PYTHONWARNINGS: \"error\"  # warnings-as-errors\n    steps:\n      - uses: actions\u002Fcheckout@34e114876b0b11c390a56381ad16ebd13914f8d5\n      - uses: actions\u002Fsetup-python@a26af69be951a213d495a4c3e4e4022e16d87065  # v5.6.0\n        with:\n          python-version-file: .python-version\n      - name: Install deps\n        run: pip install -e .[dev]\n      - name: Test with dev mode + faulthandler\n        run: pytest -W error\n```\n\n### Phase 4: Emit suppression files\n\nFor C\u002FC++, write `.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002Flsan-suppressions.txt` with documented categories:\n\n```\n# LeakSanitizer suppressions\n# Each entry MUST have a reason comment. Unjustified entries are reviewed quarterly.\n\n# Third-party library known leak (upstream tracker: \u003Clink>)\n# leak:libfoo\n\n# OpenSSL one-time init leak — by design, lives until process exit\n# leak:OPENSSL_init_crypto\n```\n\n### Phase 5: Emit operator guide\n\n`.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002FOPERATOR.md`:\n\n```markdown\n# Sanitizer Operator Guide\n\n## What each sanitizer catches\n\n- **ASan (AddressSanitizer)**: heap\u002Fstack overflow, use-after-free, double-free, memory leaks\n- **UBSan (UndefinedBehaviorSanitizer)**: signed overflow, null deref, OOB shifts, misaligned reads\n- **MSan (MemorySanitizer)**: uninitialized memory reads\n- **TSan (ThreadSanitizer)**: data races, deadlocks\n- **Race (Go)**: data races in goroutines\n- **faulthandler (Python)**: segfaults in C extensions; emits Python tracebacks\n\n## Triage workflow\n\n1. Sanitizer fails in CI → download the log artifact\n2. Identify the access (e.g., `READ of size 4 at 0x...`)\n3. Match to source via the stack trace\n4. Decide: real bug → fix; false positive → suppression entry with link to upstream issue\n\n## Suppressions policy\n\nEvery suppression entry MUST cite a reason. Quarterly review removes obsolete ones.\n```\n\n## Composition\n\n- `dev-idempotent-builds.md` rule — sanitizer CI jobs MUST use pinned action SHAs and pinned container digests\n- `ci-action-pinning.md` rule — same\n- `fuzzing-in-ci` skill — complementary; fuzzing generates inputs that sanitizers then validate\n\n## Implementation Status\n\n- `scripts\u002Femit.sh` emits recipe files under `.aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002F{ci-platform}\u002F`.\n- Recipes are starter templates; project-specific tuning is still required for build commands, dependencies, and suppression paths.\n- MSan\u002FTSan remain conditional because enabling them requires project-specific instrumentation of all dependencies.\n- OSS-Fuzz integration lives in `fuzzing-in-ci`, not here.\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Ffuzzing-in-ci\u002FSKILL.md — Companion fuzzing skill\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Flib\u002Ftoolchain-detect.sh — Shared detection\n- `.aiwg\u002Fsecurity\u002Fcurl-checklist-gap-analysis.md` row 14\n- AddressSanitizer: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanitizer\n- UBSan: https:\u002F\u002Fclang.llvm.org\u002Fdocs\u002FUndefinedBehaviorSanitizer.html\n- Rust sanitizers: https:\u002F\u002Fdoc.rust-lang.org\u002Fbeta\u002Funstable-book\u002Fcompiler-flags\u002Fsanitizer.html\n- Go race detector: https:\u002F\u002Fgo.dev\u002Fdoc\u002Farticles\u002Frace_detector\n",{"name":5,"errors":64,"script":69,"ensures":74,"requires":81,"namespace":86,"platforms":87,"invariants":89,"commandHint":92,"description":7},[65,67],{"no-supported-language":66},"project has no language this skill can wire sanitizers for",{"unknown-ci-platform":68},"no recognizable CI directory; emit recipes for all three with a chooser note",{"cwd":70,"runtime":71,"argsHint":72,"entrypoint":73},"project-root","node","[--language c|cpp|rust|go|python|node|auto] [--ci gitea|github|gitlab|auto] [--coverage]","scripts\u002Femit.mjs",[75,77,79],{"ci-recipe":76},"emit ready-to-paste CI job(s) at .aiwg\u002Fsecurity-engineering\u002Fsanitizers\u002F{ci-platform}\u002F{language}.yaml",{"suppression-template":78},"emit a starter suppressions file for known acceptable false positives",{"operator-guide":80},"emit OPERATOR.md explaining what each sanitizer catches and how to triage findings",[82,84],{"toolchain":83},"at least one supported language detected (C, C++, Rust, Go, Python, Node)",{"ci-platform":85},"known CI platform (Gitea Actions, GitHub Actions, GitLab CI) — auto-detected from .github\u002F.gitea\u002F.gitlab files","aiwg",[88],"all",[90,91],"never modifies existing CI files in place — always emits new files under .aiwg\u002F for operator review","emitted recipes do NOT replace test runs; they ADD a parallel sanitizer-enabled run",{"model":47,"category":56,"modelRole":93,"modelTier":94,"allowedTools":95,"argumentHint":96,"orchestration":60},"efficiency","economy","Read, Write, Bash, Glob, Grep","[--language c|cpp|rust|go|python|node|auto] [--ci gitea|github|gitlab|auto] [--sanitizers asan,ubsan,msan,tsan,race,faulthandler] [--coverage]","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fsanitizer-in-ci",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":9,"skillName":5,"commands":108,"prompt":118,"zipAvailable":119},[109,112,115],{"tool":110,"command":111},"npx","npx skills add jmagly\u002Faiwg --skill sanitizer-in-ci",{"tool":113,"command":114},"bunx","bunx skills add jmagly\u002Faiwg --skill sanitizer-in-ci",{"tool":116,"command":117},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill sanitizer-in-ci","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fsanitizer-in-ci\u002FSKILL.md",true,[121,127,131,134,138,142,146,152],{"path":122,"resourceType":123,"resourceTypeDesc":124,"sizeBytes":125,"sourceHtmlUrl":126},"scripts\u002Fbuild-command.js","SCRIPT","脚本",2415,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hyperexecute-skill\u002Fscripts\u002Fbuild-command.js",{"path":128,"resourceType":123,"resourceTypeDesc":124,"sizeBytes":129,"sourceHtmlUrl":130},"scripts\u002Fdoctor.js",2966,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hyperexecute-skill\u002Fscripts\u002Fdoctor.js",{"path":73,"resourceType":123,"resourceTypeDesc":124,"sizeBytes":132,"sourceHtmlUrl":133},4697,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fsanitizer-in-ci\u002Fscripts\u002Femit.mjs",{"path":135,"resourceType":123,"resourceTypeDesc":124,"sizeBytes":136,"sourceHtmlUrl":137},"scripts\u002Femit.sh",135,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fsanitizer-in-ci\u002Fscripts\u002Femit.sh",{"path":139,"resourceType":123,"resourceTypeDesc":124,"sizeBytes":140,"sourceHtmlUrl":141},"scripts\u002Fsummarize-artifacts.js",2117,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hyperexecute-skill\u002Fscripts\u002Fsummarize-artifacts.js",{"path":143,"resourceType":123,"resourceTypeDesc":124,"sizeBytes":144,"sourceHtmlUrl":145},"scripts\u002Fvalidate-config.js",2768,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hyperexecute-skill\u002Fscripts\u002Fvalidate-config.js",{"path":147,"resourceType":148,"resourceTypeDesc":149,"sizeBytes":150,"sourceHtmlUrl":151},"UPSTREAM-LICENSE.txt","REFERENCE","参考文档",1079,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hyperexecute-skill\u002FUPSTREAM-LICENSE.txt",{"path":153,"resourceType":148,"resourceTypeDesc":149,"sizeBytes":154,"sourceHtmlUrl":155},"UPSTREAM-NOTICE.md",2418,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hyperexecute-skill\u002FUPSTREAM-NOTICE.md",[157,165,170,194,213,218],{"skillNo":158,"name":159,"nameZh":17,"description":160,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":164},"01M78KW7PZJ9YQZQMW84SN2YD4","plugin-search","Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":166,"name":159,"nameZh":17,"description":160,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":164},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":171,"name":172,"nameZh":17,"description":173,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":59},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[177,178,179,180,181,45,182,183,184,185,186,187,188,48,189,190,191,192,41,193],"hardening","host","host hardening","verification","secrets","request","remediation","recommendations","audit","plan","port","bind","access","only","retention","re","firewall",{"skillNo":195,"name":196,"nameZh":17,"description":197,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":198,"categories":199,"keywords":200,"publishedAt":59},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[201,202,203,204,205,44,45,206,187,41,48,207,178,208,190,209,210,193,211,212],"analysis","exposure analysis","collection","reconstruction","operator","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":214,"name":172,"nameZh":17,"description":173,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":215,"categories":216,"keywords":217,"publishedAt":59},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[177,178,179,192,41,193,188,191,184,181,45,182,183,185,186,187,180,48,189,190],{"skillNo":219,"name":196,"nameZh":17,"description":197,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":220,"categories":221,"keywords":222,"publishedAt":59},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[201,202,212,211,205,210,209,190,204,44,45,206,187,203,48,207,178,193,41,208]]