NickLiffen / ghas-enablement

A tool that aims to bulk automates the enablement of GitHub Code Scanning, Secret Scanning and Dependabot across multiple repositories.
152 stars 52 forks source link

Support for updating existing CodeQL Analysis #148

Open john-yacuta-submittable opened 1 month ago

john-yacuta-submittable commented 1 month ago

Does this tool support updating existing CodeQL Analysis files codeql-analysis.yml after using this tool? If not, is it possible to add this support?

Scenario:

  1. Use this tool to run against all repos in an organization to enable CodeQL Analysis.
  2. Revisit the tool some months later.
  3. Can I use this tool again but to update certain fields in each of the codeql-analysis-{language}.yml files? E.g. I would like to enable this to run on self-hosted runners by updating the runs-on field.

I ran npm run start and the codeql-analysis.yml file stayed the same for a repo that was detected in the repos.json.

Output:

ghas:inform Enabled GHAS for <REPO>. Status: 200 +700ms
ghas:inform Has submittable/<REPO> had a CodeQL scan uploaded? true +281ms