new: dev: [ci] initial auto-update list workflow - #353
Draft
achrinza wants to merge 3 commits into
Draft
Conversation
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
| if new_warninglist == existing_warninglist: | ||
| logging.info("No changes to warninglist. Skiping version bump for {}.".format(get_abspath_list_file(dst))) | ||
| skip_updates = True | ||
| except FileNotFoundError: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a draft PR for a CI workflow that auto-updates the lists on a weekly basis and also ad-hoc list updates via workflow dispatch.
How it's Setup
When combined with the workflow artifact, this is useful for tracing back the CI state+environment which generated a specific iteration of a warninglist. This helps with reproducibility (see TODOs below).
Additional configuration needed:
CLOUDFLARE_RADAR_API_TOKENto be configured as a repository secretOther Misc. Changes
These changes are complementary to the auto-update workflow:
generator.pyversionwhen the list itself has not changed.pyproject.tomlreplaces the olderrequirements.txtpylock.tomlfile is used to improve the resiliency of the pipeline (from supply chain attacks and unwanted breaking changes) by allowing dependency upgrades to be controlledpip install -r pyproject.toml. For consumers who want to have a stable dependency tree, they can dopip install -r pylock.toml --no-deps.Breaking changes
Min. Python upgraded to v3.10
pyproject.toml(which is 3.10)TODOs
pull_requestvalidationTo gate pull requests such that it cannot break the CI pipeline.
It's a bit pointless to attest a file that never gets touched by the CI pipeline
A common workflow file also means that attestations can be done against the whole workflow file's digest, and thus it's possible to programmatically detect when the workflow file changes without needing the repo's Git history.It's set to 1 day to reduce clutter during testing. However, the usefulness of the SLSA provenance depends on having access to the
tmpdirectory generated during build time. This is stored in the auto-updated-lists artifact.Same reason as above; We should ideally retain all copies of generate workflow artifacts for each run.
Example auto-update PR: achrinzafork#2
Example attestation: https://github.com/achrinzafork/misp-warninglists/attestations/40266806
Example attestation verification:
closes: #102