The Action uploads every SARIF under one fixed category

オープン
#197 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, go
領域
ci-cd, security

調査の方向性

Start with the SARIF upload and report directory references in action.yml:215, action.yml:268, and action.yml:273, then read docs/ci.md:44 and .github/workflows/action.yml for the action’s documented inputs and workflow coverage. Run make test-short and make lint as listed in the issue. Done means separate uses preserve both alert sets, a later use cannot reuse an earlier use’s reports, and docs/ci.md describes the new input.

索引モデルが issue の本文から書いたものです。

説明

bug good first issue severity: low

Summary

The upload step always passes category: spackle and the report directory is fixed, so a workflow that uses the action more than once for one commit ends with the alerts of only the last upload.

Where

  • action.yml:273 (category: spackle)
  • action.yml:215 (out="${RUNNER_TEMP}/spackle-report")
  • action.yml:268
  • docs/ci.md:44

Details

Code scanning keeps one analysis per tool, category, ref and commit, so a second upload with the same category replaces the first (documented GitHub behavior; not exercised during the audit). The path input and the SARIF repository-prefix handling show that scanning a subdirectory is a supported use.

Impact

A monorepo workflow with two path values, a matrix over services, or a deterministic plus a model run closes the alerts of the earlier scans as fixed. Within one job, the second use also finds the first use's report.sarif and report.json in the shared directory, so if the second scan is refused before it writes reports, the outputs are those of the first scan.

Suggested fix

Add a sarif-category input that defaults to spackle when path is . and to spackle-<path> otherwise, pass it to the upload step, and document it in docs/ci.md. Make the report directory unique per invocation (mktemp -d "${RUNNER_TEMP}/spackle-report.XXXXXX").

Acceptance criteria

  • Two uses of the action in one workflow keep both sets of alerts
  • A second use in one job never reads the first use's reports
  • docs/ci.md documents the input

Related: #7

Getting started

  • Relevant files: action.yml, docs/ci.md, .github/workflows/action.yml
  • How to run tests: make test-short (Unix) or .\make.ps1 test-short (Windows PowerShell); make lint before you call it done
  • Related docs: docs/ci.md

Filed by repo-audit/full-audit at 50e92ec. Severity: low. Effort: S. audit-key: bug|action.yml|upload-sarif.category

主要言語
Go
スター
0
フォーク
1
平均マージ
8時間 14分
マージ済み PR(30日)
3

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/Spackle のほかの issue

TMHSDigital/Spackle の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。