Skip to content

Commit 231ac62

Browse files
committed
docs: risks of pinning
1 parent e9987ad commit 231ac62

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ We typically release new minor versions of the CodeQL Action and Bundle when a n
7777

7878
See the full list of GHES release and deprecation dates at [GitHub Enterprise Server releases](https://docs.github.com/en/enterprise-server/admin/all-releases#releases-of-github-enterprise-server).
7979

80+
## Keeping the CodeQL Action up to date
81+
82+
We recommend referencing the CodeQL Action using a major version tag (e.g. `v3`) in your workflow file. This ensures your workflow automatically picks up the latest release within that major version, including bug fixes, new features, and updated CodeQL CLI versions.
83+
84+
**Avoid pinning to a specific commit SHA, patch version tag, or branch name.** Some CodeQL Action features are controlled by server-side flags that may be removed over time. Pinning an old version can cause these features to silently stop working.
85+
86+
```yaml
87+
- uses: github/codeql-action/init@v3 # Recommended
88+
- uses: github/codeql-action/init@a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d # Not recommended
89+
```
90+
91+
8092
## Troubleshooting
8193
8294
Read about [troubleshooting code scanning](https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning).

0 commit comments

Comments
 (0)