Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ci: Add zizmor static analysis #34905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Ci: Add zizmor static analysis #34905
Changes from all commits
26b7da19a9c6a04a1b0ef6211c1a93fb631824e8eae96f4ea8fe4017a5cd5e59f985b1f15e94a165e308File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
GitHub API authentication curl PAT token format 2025💡 Result:
For GitHub REST API authentication with curl using a Personal Access Token (PAT), the PAT value is sent in the HTTP Authorization header, typically as either: 1) Authorization: Bearer Example (GitHub docs): curl --request GET --url "https://api.github.com/octocat" --header "Authorization: Bearer YOUR-TOKEN" [1] 2) Authorization: token GitHub docs note that in most cases you can use Authorization: Bearer or Authorization: token to pass a token (but for JWT you must use Bearer). [1] PAT token “format” (the characters/prefix you’ll see) - GitHub personal access tokens use prefixes: ghp_, gho_, ghu_, ghs_, or ghr_ (case-sensitive prefix). [2] - Those prefixes are followed by the token body characters; a Microsoft security definition describes the overall entity as a prefix plus 36 characters composed of a-z/a-z (case-insensitive) and 0-9. [3] Common curl pattern (concise) curl -H "Authorization: Bearer $GITHUB_TOKEN_OR_PAT" \ -H "X-GitHub-Api-Version: " \ "https://api.github.com/" [1] Important related note (avoid quoting token syntax in curl) GitHub’s docs show the token is supplied via the Authorization header; you typically should not put it in the URL path/query. [1] Answering your “2025” point The token mechanism described in GitHub’s REST authentication docs (Authorization header with Bearer/token) is the current supported method, and the docs show an example using Authorization: Bearer. [1] The token prefixes (ghp_/gho_/ghu_/ghs_/ghr_) and added underscore separator are described in GitHub’s engineering blog. [2]
Citations:
Fix GitHub API curl authentication to use an Authorization header.
-u "$FRONTPAGE_TOKEN"passes the PAT as the basic-auth username (with empty password). For GitHub REST API PAT authentication, the token should be sent via theAuthorizationheader (e.g.,Authorization: token $FRONTPAGE_TOKEN).🔧 Proposed fix using Authorization header
curl -X POST https://api.github.com/repos/storybookjs/frontpage/dispatches \ -H 'Accept: application/vnd.github.v3+json' \ - -u "$FRONTPAGE_TOKEN" \ + -H "Authorization: token $FRONTPAGE_TOKEN" \ --data "$DISPATCH_PAYLOAD"📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot fix this
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.