-
Notifications
You must be signed in to change notification settings - Fork 2.3k
OCPERT-368: Replace GitHub token with Github app for Jira Notificator #79905
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ jira_username=$(cat "/var/run/vault/release-tests-token/jira_username") | |
| export JIRA_USERNAME=$jira_username | ||
| jira_token=$(cat "/var/run/vault/release-tests-token/jira_token") | ||
| export JIRA_TOKEN=$jira_token | ||
| github_token=$(cat "/var/run/vault/release-tests-token/github_token") | ||
| export GITHUB_TOKEN=$github_token | ||
| github_app_reader_id=$(cat "/var/run/vault/release-tests-token/github_app_reader_id") | ||
| export GITHUB_APP_READER_ID=$github_app_reader_id | ||
| github_app_reader_private_key="/var/run/vault/release-tests-token/github_app_reader_private_key" | ||
| export GITHUB_APP_READER_PRIVATE_KEY=$github_app_reader_private_key | ||
|
Comment on lines
+8
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 8 assigns the path string, while the PR objective says this credential should be read from Vault and exported. This can break auth if Suggested fix-github_app_reader_private_key="/var/run/vault/release-tests-token/github_app_reader_private_key"
-export GITHUB_APP_READER_PRIVATE_KEY=$github_app_reader_private_key
+github_app_reader_private_key=$(cat "/var/run/vault/release-tests-token/github_app_reader_private_key")
+export GITHUB_APP_READER_PRIVATE_KEY="$github_app_reader_private_key"🤖 Prompt for AI Agents |
||
| oarctl jira-notificator | ||
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.
Guard sensitive reads/exports with xtrace disable + restore.
This script handles Vault-backed secrets, but Line 6-9 do not save/restore xtrace state and force
set +xduring secret handling. Please wrap the sensitive block accordingly.Suggested hardening
As per coding guidelines, "In step registry scripts handling sensitive data, temporarily disable tracing with
set +xand save/restore previous tracing state to prevent credential leakage in logs."🤖 Prompt for AI Agents