Repository navigation
Remove duplicate CodeQL workflow and tidy codeql-analysis.yml - #1295
Conversation
The repository had two workflows named "CodeQL": the original
codeql-analysis.yml (Python and Actions) and a later codeql.yml
(Actions only). Both uploaded results under the same category,
so the Actions language was scanned twice on every push and PR.
Delete codeql.yml and clean up the surviving workflow:
- run on ubuntu-latest
- use block-style lists for the branches and language arrays
- move the daily schedule off the top of the hour
- cancel in-progress runs only for pull requests
- set top-level permissions to {} and grant only
security-events: write on the job, since read permissions
are implicit on a public repository
- drop the Autobuild step, which is a no-op for Python and Actions
Assisted-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
I agree we should drop codeql.yml and keep only codeql-analysis.yml (not sure how that happened, likely my bad).
I don't think we should deviate unnecessarily from upstream in codeql-analysis.yml, though - except perhaps for tightening the permissions and the name of the main branch.
I see no big issue with that. With agents nowadays maintainin and updating differences is basically no-op. I completely changed the approach now in such cases after I started to use agents:
This is how it works with Magpie. And it works extremely well. |
Co-authored-by: Jarek Potiuk <jarek@potiuk.com> Signed-off-by: Piotr P. Karwasz <piotr@github.copernik.eu>
Where is the upstream? In the short term I expect apache/infrastructure-asfyaml#122 to be accepted and after that we don't need to maintain CodeQL workflows any more (as we don't maintain Dependabot workflows). |
Oh.. How I would love asfyaml to be able to move faster - and I even have apache/infrastructure-asfyaml#127 to make it possible - with this workflow, we should be able to test asfyaml changes (both contributors and reviewers) in our forks end-2-end. I would love some encouragemenet here (also in |
Sorry, brainfart on my side :) |
The repository had two workflows named "CodeQL": the original
codeql-analysis.yml(Python and Actions) and a latercodeql.yml(Actions only). Both uploaded results under the same category, so the Actions language was scanned twice on every push and PR, and two identically named checks showed up on each PR.This PR deletes
codeql.ymland cleans up the surviving workflow:ubuntu-latestbranchesandlanguagearrayspermissions: {}and grant onlysecurity-events: writeon the job, since read permissions are implicit on a public repositoryZizmor reports no findings on the updated workflow.
🤖 Generated with Claude Code