Update API permissions warning

This commit is contained in:
Michael B. Gale
2025-10-23 13:02:31 +01:00
parent 42642085de
commit d1b51f05c9
7 changed files with 8 additions and 8 deletions

View File

@@ -666,10 +666,10 @@ class GitHubFeatureFlags {
const httpError = util.asHTTPError(e);
if (httpError?.status === 403) {
this.logger.warning(
"This run of the CodeQL Action does not have permission to access Code Scanning API endpoints. " +
"This run of the CodeQL Action does not have permission to access the CodeQL Action API endpoints. " +
"As a result, it will not be opted into any experimental features. " +
"This could be because the Action is running on a pull request from a fork. If not, " +
`please ensure the Action has the 'security-events: write' permission. Details: ${httpError.message}`,
`please ensure the workflow has at least the 'security-events: read' permission. Details: ${httpError.message}`,
);
this.hasAccessedRemoteFeatureFlags = false;
return {};