Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
cache-cleanup: always

- name: Initialize CodeQL
uses: github/codeql-action/init@e0647621c2984b5ed2f768cb892365bf2a616ad1 # v4.37.2
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n 'uses:\s*github/codeql-action/(init|analyze|upload-sarif)@' .github/workflows

Repository: Xquik-dev/x-twitter-scraper-java

Length of output: 553


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- workflow ---'
sed -n '35,60p' .github/workflows/codeql.yml

printf '%s\n' '--- CodeQL tag refs ---'
for tag in v4.37.2 v4.37.3; do
  curl -fsSL "https://api.github.com/repos/github/codeql-action/git/refs/tags/${tag}" |
    jq -r '"\(.ref): type=\(.object.type) sha=\(.object.sha)"'
done

printf '%s\n' '--- pinned commit metadata ---'
for sha in \
  e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 \
  e0647621c2984b5ed2f768cb892365bf2a616ad1
do
  curl -fsSL "https://api.github.com/repos/github/codeql-action/commits/${sha}" |
    jq -r '"\(.sha) \(.commit.message | split("\n")[0])"'
done

Repository: Xquik-dev/x-twitter-scraper-java

Length of output: 948


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

git ls-remote --refs https://github.com/github/codeql-action.git \
  refs/tags/v4.37.2 \
  refs/tags/v4.37.3

git ls-remote https://github.com/github/codeql-action.git \
  refs/tags/v4.37.2^{} \
  refs/tags/v4.37.3^{} \
  e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 \
  e0647621c2984b5ed2f768cb892365bf2a616ad1

Repository: Xquik-dev/x-twitter-scraper-java

Length of output: 412


🌐 Web query:

GitHub CodeQL Action documentation all CodeQL Action steps same version init analyze

💡 Result:

It is required to use the same version of the CodeQL Action across all steps (such as init, analyze, etc.) within a single GitHub Actions workflow [1][2]. Mixing different versions of the CodeQL Action in the same workflow is unsupported and can lead to unpredictable results [1][3]. To ensure consistency and prevent errors: - Validation: The CodeQL Action emits a warning from the init step if it detects that different versions of the CodeQL Action are used within the same workflow [1][4]. - Errors: Other CodeQL Action steps will throw an error if they attempt to load a configuration file that was generated by a different version of the init step [1][5]. - Best Practice: Use a major version tag (e.g., v4) in your workflow file [6][7]. This allows your workflow to automatically receive updates, such as bug fixes, new features, and compatible CodeQL CLI versions, while maintaining the required version consistency across all steps [6][8]. If you find it necessary to pin to a specific version (such as a specific patch version or commit SHA) for advanced setups, you must ensure that every step in the workflow uses the exact same reference to avoid compatibility issues [6][7].

Citations:


Align the CodeQL Action versions.

init and analyze must use the same release. Update analyze to commit e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 (v4.37.3).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/codeql.yml at line 44, Update the CodeQL workflow’s
analyze action to use commit e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 (v4.37.3),
matching the version already used by the init action. Leave the init
configuration unchanged.

with:
languages: java-kotlin
build-mode: manual
Expand Down
Loading