Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish OSV data to dedicated branch #78

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

frasertweedale
Copy link
Collaborator

@frasertweedale frasertweedale commented Jun 28, 2023

note: the PR's CI job won't publish the advisories. This is by design. Only pushes to main will trigger the publish step.

The osv.dev project will be enhanced to ingest OSV data from our advisory database. One of the convenient formats for them is to track a Git branch containing the raw OSV data.

To facilitate this, add a CI step that exports the OSV data to the generated/osv-export branch. This step only runs upon a push to main. It exports all the advisories as OSV JSON files, sorted into directories by year. Then it snapshots this content onto the generated/osv-export branch and pushes it. The commit message contains a UTC timestamp, and the hash of the corresponding commit on main.

No commit is made unless the OSV content has changed. The generated/osv-export target branch must already exist.

The GitHub Actions token needs write permissions in the repository, so that it can push the updated OSV data branch.


hsec-tools

  • Previous advisories are still valid

The osv.dev project will be enhanced to ingest OSV data from our
advisory database.  One of the convenient formats for them is to
track a Git branch containing the raw OSV data.

To facilitate this, add a CI step that exports the OSV data to the
`generated/osv-export` branch.  This step only runs upon a push to
`main`.  It exports all the advisories as OSV JSON files, sorted
into directories by year.  Then it snapshots this content onto the
`generated/osv-export` branch and pushes it.  The commit message
contains a UTC timestamp, and the hash of the corresponding commit
on `main`.

No commit is made unless the OSV content has changed.  The
`generated/osv-export` target branch must already exist.

The GitHub Actions token needs write permissions in the repository,
so that it can push the updated OSV data branch.
@blackheaven blackheaven merged commit bf961cb into haskell:main Jun 29, 2023
@frasertweedale frasertweedale deleted the ci/osv branch June 29, 2023 11:48
@frasertweedale frasertweedale mentioned this pull request Jul 1, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants