arpitjain099 commented on PR #63573:
URL: https://github.com/apache/doris/pull/63573#issuecomment-4541084464

   Hi, addressing the template prompt:
   
   1. **Problem**: Default `GITHUB_TOKEN` on the touched workflows was the 
repo-level default (typically `read/write` for issues/contents/etc), which is 
wider than the workflow actually uses. After CVE-2025-30066 (the March 
`tj-actions/changed-files` supply-chain compromise), the standard 
recommendation is to declare per-workflow least-privilege so an exfiltrated 
token has the smallest possible blast radius.
   
   2. **Behavior modified**: Four PR-time check workflows (`clang-format`, 
`license-eyes`, `lfs-warning`, `title-checker`) now declare a workflow-level 
`permissions: contents: read` block. Functionally nothing changes for callers - 
the workflows still read the PR diff and run their respective checks. The token 
they now hold is just bounded to `contents: read` rather than the repo-level 
default.
   
   3. **Features added**: None. This is hardening only.
   
   4. **Refactoring**: None. Three lines added per file (the `permissions` 
block); no logic touched.
   
   Side note: `.github/` is in this repo's `.gitignore`, so I had to use `git 
add -f` to stage the files. If you'd rather the workflow files be managed 
differently (e.g., generated from a template), happy to close.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to