Skip to content

security: SARIF upload を always() で実行 (audit M-O2)#9

Merged
hinanohart merged 1 commit into
mainfrom
security/zizmor-sarif-always-upload-2026-05-16
May 15, 2026
Merged

security: SARIF upload を always() で実行 (audit M-O2)#9
hinanohart merged 1 commit into
mainfrom
security/zizmor-sarif-always-upload-2026-05-16

Conversation

@hinanohart

Copy link
Copy Markdown
Owner

動機

audit M-O2: zizmor を C5 で blocking 化 (continue-on-error: true 削除) した結果、findings 時に Run zizmor step が exit 1 → デフォルトの if: success() で後続 Upload SARIF step が skip される. 結果として SARIF が GitHub Security tab に上がらず、findings が「blocking」になった代わりに「不可視化」される反転リスクが発生.

修正

Upload SARIF step の if: 条件に always() を追加. zizmor の exit code に関わらず SARIF upload を実行.

修正前:

- name: Upload SARIF
  if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

修正後:

- name: Upload SARIF
  if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)

効果

  • zizmor が findings 出した時 (exit 1): SARIF upload も実行 → Security tab に findings 表示 → CI も fail
  • findings なし時 (exit 0): 従来通り SARIF upload (空 findings として記録)

@hinanohart hinanohart merged commit a53f339 into main May 15, 2026
11 checks passed
@hinanohart hinanohart deleted the security/zizmor-sarif-always-upload-2026-05-16 branch May 15, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant