Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
branches: [ "main" ]
schedule:
- cron: '26 23 * * 2'
workflow_dispatch:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatchトリガーの追加は良い改善です。これにより手動でCodeQL分析を実行できるようになり、セキュリティ監査やトラブルシューティングに役立ちます。セキュリティワークフローの柔軟性が向上します。


jobs:
analyze:
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHA固定によるセキュリティ強化は素晴らしい改善です。ただし、actions/checkout@v5.0.0のSHA 08c6903cd8c0fde910a37f88322edcfb5dd907a8 が実際にv5.0.0タグと一致するかを確認することをお勧めします。SHA固定を使用する場合、正しいバージョンのSHAを使用していることを検証することが重要です1

Footnotes

  1. CWE-494: Download of Code Without Integrity Check - https://cwe.mitre.org/data/definitions/494.html


# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
Expand All @@ -67,7 +68,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQLアクションのSHA固定は優れたセキュリティプラクティスです。ただし、両方のCodeQLアクション(initとanalyze)で同じSHA 303c0aef88fc2fe5ff6d63d3b1596bfd83dfa1f9 を使用していることを確認しました。これは一貫性があり良い実装です。定期的にこれらのSHAを最新の安定版に更新することを忘れないでください。

uses: github/codeql-action/init@v3
uses: github/codeql-action/init@303c0aef88fc2fe5ff6d63d3b1596bfd83dfa1f9 # v3.30.4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand Down Expand Up @@ -95,6 +96,6 @@ jobs:
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@303c0aef88fc2fe5ff6d63d3b1596bfd83dfa1f9 # v3.30.4
with:
category: "/language:${{matrix.language}}"