Skip to content

chore: drop unused id-token: write from auto_update_charm_libs.yaml - #1036

Open
seb4stien wants to merge 1 commit into
mainfrom
chore/drop-id-token-write-auto-update-libs
Open

chore: drop unused id-token: write from auto_update_charm_libs.yaml#1036
seb4stien wants to merge 1 commit into
mainfrom
chore/drop-id-token-write-auto-update-libs

Conversation

@seb4stien

Copy link
Copy Markdown
Contributor

Why

auto_update_charm_libs.yaml's job currently requests id-token: write, forcing every calling workflow to grant an OIDC token permission it doesn't need.

Looking at the job's steps:

  • actions/checkout — no OIDC use.
  • charmcraft fetch-lib — authenticates to Charmhub via the static CHARMHUB_TOKEN secret (CHARMCRAFT_AUTH env var), not OIDC.
  • canonical/create-pull-request — authenticates via secrets.GITHUB_TOKEN, not OIDC.

Neither charmcraft/craft-store nor create-pull-request request an OIDC token anywhere in their source. The `# Enable OIDC" comment and the README's permissions table appear to be leftover/aspirational rather than something actually wired up today.

Change

  • Remove id-token: write from the update-lib job permissions.
  • Update the README permissions table to reflect the real requirement (contents: write, pull-requests: write) and clarify Charmhub auth is via CHARMHUB_TOKEN.

Follow-up for consumers

Repos calling this workflow (e.g. canonical/nginx-ingress-integrator-operator) can drop id-token: write from their own permissions: block once this merges.

If OIDC-based Charmhub trusted publishing is actually planned, happy to instead gate id-token: write behind an opt-in input rather than requiring it unconditionally — let me know.

The job's steps (checkout, charmcraft fetch-lib, create-pull-request)
authenticate via the static CHARMHUB_TOKEN secret and the GITHUB_TOKEN
respectively; none of them request an OIDC token. Requiring
id-token: write forces every calling workflow to grant an unused
permission. Drop it from the job and update the README permissions
table to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@seb4stien
seb4stien requested a review from a team as a code owner August 18, 2026 12:27
@github-actions

Copy link
Copy Markdown
Contributor

Test results for commit 203e86e

Test coverage for 203e86e

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-08-18 12:27:44.650023+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions

Copy link
Copy Markdown
Contributor

Test results for commit 203e86e

Test coverage for 203e86e

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-08-18 12:27:43.165089+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions

Copy link
Copy Markdown
Contributor

Test results for commit 203e86e

Test coverage for 203e86e

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-08-18 12:29:53.175048+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions

Copy link
Copy Markdown
Contributor

Test results for commit 203e86e

Test coverage for 203e86e

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-08-18 12:27:44.650023+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions

Copy link
Copy Markdown
Contributor

Test results for commit 203e86e

Test coverage for 203e86e

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-08-18 12:27:43.165089+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@github-actions

Copy link
Copy Markdown
Contributor

Test results for commit 203e86e

Test coverage for 203e86e

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       8      8      0      0     0%   8-25
----------------------------------------------------------
TOTAL              8      8      0      0     0%

Static code analysis report

Run started:2026-08-18 12:29:53.175048+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 56
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@seb4stien
seb4stien requested a review from srbouffard August 18, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants