Skip to content

fix: scope publish smoke-test token and correct CodeQL build comment#140

Merged
OmarAlJarrah merged 1 commit into
mainfrom
d1-ci-fixes
Jul 19, 2026
Merged

fix: scope publish smoke-test token and correct CodeQL build comment#140
OmarAlJarrah merged 1 commit into
mainfrom
d1-ci-fixes

Conversation

@OmarAlJarrah

Copy link
Copy Markdown
Member

Summary

  • publish.yml set contents: write at the workflow level for the publish job's gh release create/gh release upload calls, but the smoke-test job inherited that same write scope even though it only checks out the repo and curls a public Maven Central URL with no GH_TOKEN set. Add a job-level permissions: contents: read override on smoke-test so its token carries no more privilege than the job actually uses.
  • codeql.yml's comments said the manual compileKotlinJvm build step "runs in :kuri and :kuri-bind," but the task is invoked unqualified, so Gradle also runs it in kuri-serde-kotlinx, which declares its own jvm {} target with real production Kotlin source. Updated both comments (top-of-file and next to the compile step) to list all three modules.

Test plan

  • Parsed both edited files with YAML.load_file (Ruby's stdlib YAML) to confirm they're still well-formed
  • Read through the full diff by hand to confirm the permissions override is scoped to the smoke-test job only and doesn't touch publish's workflow-level contents: write
  • Doc/comment + permissions-only change; no Gradle build required per repo convention

Closes #90
Closes #101

publish.yml set contents: write at the workflow level so the publish
job's gh release create/upload calls work, but the smoke-test job
inherited that write scope too even though it only checks out the repo
and curls a public Maven Central URL. Add a job-level contents: read
override so a compromised action in that job can't use a write token
it never needed.

Also update codeql.yml's build-scope comments: they said the manual
compileKotlinJvm step only touches :kuri and :kuri-bind, but the task
is invoked unqualified, so Gradle also runs it in kuri-serde-kotlinx,
which has its own jvm {} target and production Kotlin source. List all
three modules so the comment matches what's actually compiled and
scanned.

Closes #90, #101
@OmarAlJarrah
OmarAlJarrah merged commit 29e7e4f into main Jul 19, 2026
13 checks passed
@OmarAlJarrah
OmarAlJarrah deleted the d1-ci-fixes branch July 19, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant