1- # TEMPORARY mining runner (not for main). The on-demand `mine.yml` is
2- # workflow_dispatch-only and the agent's API token can't dispatch it, so this
3- # pushes a one-off mining run on a `claude/mine-*` branch: clone a pool-heavy
4- # public C# repo and run own-check over it, echoing the report into the job log
5- # for an FP audit. Read-only; delete the branch when the audit is done. Edit the
6- # target in the "Mine the target" step and re-push to scan a different repo/subdir.
1+ # TEMPORARY mining runner (not for main). mine.yml is workflow_dispatch-only and
2+ # the agent's API token can't dispatch it, so this pushes a one-off run on a
3+ # `claude/mine-*` branch: clone pool-heavy public C# repos and run own-check over
4+ # them, echoing each report into the job log for a false-positive audit. Read-only;
5+ # delete the branch when the audit is done. Edit TARGETS and re-push to scan others.
76name : mine-run (temp)
87
98on :
@@ -25,18 +24,28 @@ jobs:
2524 - uses : actions/setup-dotnet@v4
2625 with :
2726 dotnet-version : " 8.0.x"
28- - name : Mine the target
29- run : scripts/mine.sh --paths src/MessagePack MessagePack-CSharp/MessagePack-CSharp
30- - name : Echo report + findings into the job log
27+ - name : Mine the targets
28+ run : |
29+ # "owner/repo::subdir" (subdir optional; empty -> whole repo)
30+ targets=(
31+ "microsoft/Microsoft.IO.RecyclableMemoryStream::src"
32+ "mgravell/Pipelines.Sockets.Unofficial::src"
33+ )
34+ for t in "${targets[@]}"; do
35+ repo="${t%%::*}"; path="${t##*::}"; [[ "$path" == "$repo" ]] && path=""
36+ echo "::group::mine $repo ${path:+($path)}"
37+ args=(); [[ -n "$path" ]] && args+=(--paths "$path")
38+ scripts/mine.sh "${args[@]}" "$repo" || echo "mine: FAILED for $repo (see above)"
39+ echo "::endgroup::"
40+ done
41+ - name : Echo all reports + findings into the job log
3142 if : always()
3243 run : |
33- report=$(find corpus/mined -name report.md -type f 2>/dev/null | head -1 || true)
34- findings=$(find corpus/mined -name findings.txt -type f 2>/dev/null | head -1 || true)
35- if [[ -n "$report" ]]; then
36- echo "::group::report.md"; cat "$report"; echo "::endgroup::"
37- else
38- echo "no report produced (see the Mine step log)"
39- fi
40- if [[ -n "$findings" ]]; then
41- echo "::group::findings.txt (SARIF)"; cat "$findings"; echo "::endgroup::"
42- fi
44+ for r in corpus/mined/*/report.md; do
45+ [[ -f "$r" ]] || continue
46+ echo "::group::report.md — $r"; cat "$r"; echo "::endgroup::"
47+ done
48+ for f in corpus/mined/*/findings.txt; do
49+ [[ -f "$f" ]] || continue
50+ echo "::group::findings.txt — $f"; cat "$f"; echo "::endgroup::"
51+ done
0 commit comments