repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

Run DevSkim only when source code changes (#25)

c6a4cf3f3f23e025376e5e41edeeca32bc90e1ef

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

## What forced this
DevSkim fired on every push and PR — a one-line labels/markdown edit
triggered a full multi-language security scan with nothing in-scope to
scan. Wasted minutes and noise on every docs/config change.

## The call
Pin the incremental (`push`/`pull_request`) triggers to source
extensions — `rs`, `lua`, `js`, `ts`, `tsx`, `astro`, `sh` — so
docs/config/markdown PRs skip the scan; the existing weekly `schedule`
stays as the full-tree backstop.

## What we deliberately didn't do
Didn't drop the weekly full scan, so nothing a path filter skips is ever
permanently unscanned; didn't touch CodeQL (that's GitHub default setup
— a UI toggle, not a repo file, and premature until the first Rust
lands).

## Evidence
`paths` filter parses and expands via a YAML anchor to the same list on
both triggers. Safe because DevSkim is not a required merge check — only
`merge-gate` is — so a path-skipped run can't wedge a PR.

## Surface touched
`.github/workflows/devskim.yml` (the `on:` triggers).

## If this ages badly
Widen or drop the `paths` list; the weekly scan is the safety net either
way.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01LABEHeVpg74oyZNtWLUWpB)_

Co-authored-by: Claude <noreply@anthropic.com>

Changed files (1)

+13 / −0 text lines

Diff layout

.github/workflows/devskim.yml

Modified

+13 / −0 text lines

66name: DevSkim
8# Incremental scans run only when source code changes — a docs/config/markdown
9# PR has nothing for a code security scanner to find. The weekly schedule is the
10# full-tree backstop, so nothing a path filter skips stays permanently unscanned.
11# (Safe because DevSkim is not a required merge check; only `merge-gate` is.)
812on:
913 push:
1014 branches: [ "main" ]
15 paths: &code
16 - '**/*.rs'
17 - '**/*.lua'
18 - '**/*.js'
19 - '**/*.ts'
20 - '**/*.tsx'
21 - '**/*.astro'
22 - '**/*.sh'
1123 pull_request:
1224 branches: [ "main" ]
25 paths: *code
1326 schedule:
1427 - cron: '29 9 * * 5'