Skip to content

Conversation

@rgmz
Copy link
Contributor

@rgmz rgmz commented Aug 18, 2024

This fixes #190.

Tested against an instance of GHES. It works for rules like "CI Runner Debug Enabled" and "Pull Request Runs on Self-Hosted GitHub Actions Runner" but not "GitHub Action from Unverified Creator used". That requires somehow passing the base domain to PurlFromGithubActions and PurlFromDockerImage, which could be more complicated.

domain = a.ScmClient.GetProviderBaseURL()
)
if domain != scm_domain.DefaultGitHubDomain && domain != scm_domain.DefaultGitLabDomain {
purl, _ = models.NewPurl(fmt.Sprintf("pkg:%s/%s?repository_url=%s", repo.GetProviderName(), repo.GetRepoIdentifier(), domain))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's fine that repository_url is the domain without schema. Some purl examples include schema, others don't.

https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst

@@ -1,10 +1,13 @@
package scm
package scm_domain
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One possible solution to prevent cyclical references.

@rgmz rgmz marked this pull request as ready for review August 19, 2024 23:51
@rgmz rgmz requested a review from a team as a code owner August 19, 2024 23:51
@SUSTAPLE117 SUSTAPLE117 merged commit b4927ee into boostsecurityio:main Aug 26, 2024
@rgmz rgmz deleted the fix/finding-link branch August 26, 2024 14:45
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.

URL in finding does not respect --scm-base-url

2 participants