Draft: Support ruleset git refs
What does this MR do?
Initial implementation of gitlab-org/gitlab#393452 (closed)
Update package to include ruleset.LoadRef
function for loading remote rulesets using an SCP-style reference string.
Example usage:
NOTE: below is a real project token but it's limited to repository_read
for a clone of the second project, a public test project. Unfortunately, this is currently necessary to test the behavior but I plan on cleaning it up to not rely on my personal forks at the very least.
import "gitlab.com/gitlab-org/security-products/analyzers/ruleset"
config1 := ruleset.LoadRef("gitlab.com/theoretick/sdlksdjklw3")
config2 := ruleset.LoadRef("gitlab.com/gitlab-org/security-products/tests/go@2488eaa671cc02ecc73cddffc5a2b4c528469933")
config3 := ruleset.LoadRef("myusername:glpat-R_Lue78GBxoMW2zgJn6d@gitlab.com/theoretick/tests-go-private@2488eaa671cc02ecc73cddffc5a2b4c528469933")
What are the relevant issue numbers?
gitlab-org/gitlab#393452 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Lucas Charles