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

Add dependency submission job to CI #340

Merged
merged 2 commits into from
Jul 16, 2022
Merged

Add dependency submission job to CI #340

merged 2 commits into from
Jul 16, 2022

Conversation

armanbilge
Copy link
Member

Closes #326.

This adds a job that submits the projects dependencies to GitHub via
https://github.com/scalacenter/sbt-dependency-submission

Results should go here:
https://github.com/typelevel/sbt-typelevel/network/dependencies

Annoyingly I don't think we'll be able to see any results yet. I've targeted this at the main branch since I'm not sure yet how stable the action is, but GitHub only cares about the default branch which is series/0.4.

steps = githubWorkflowJobSetup.value.toList :+
WorkflowStep
.DependencySubmission
.withCond(Some("github.event_name != 'pull_request'"))
Copy link
Member Author

@armanbilge armanbilge Jul 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm a bit confused if we want to enable it for PRs or not. This page seems to suggest that if a PR updates dependencies that it can be reviewed, so it really seems like it would need this to run for that PR. But all the examples I've seen only run it on push.

https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API submissions are not yet integrated into Dependency Review or Organization Insights, but they do trigger Dependabot alerts, even for transitive dependencies (which the POM integration does not!).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did experiment with dependency review in #342 but the problem is that PRs from external repos don't have permission to submit the dependencies, so I'm not entirely sure how it would work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just introduced a vulnerability in a PR, and nothing flagged it until I merged. I think push for now, and pull once GitHub better integrates their new toys.

@armanbilge armanbilge merged commit 0aa7d07 into main Jul 16, 2022
@armanbilge armanbilge deleted the issue/326 branch July 16, 2022 19:32
@armanbilge armanbilge linked an issue Jul 16, 2022 that may be closed by this pull request
Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, cool. I was just coming to request this feature!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI job for submitting dependency graph to GitHub
2 participants