This repository was archived by the owner on Sep 30, 2024. It is now read-only.
feat(sg/repoferee): add security command with repo-report subcommand to fetch latest repoferee report#62735
Merged
Merged
Conversation
Comment on lines
+26
to
+44
| Description: "Learn more about Sourcegraph security: https://sourcegraph.notion.site/Security-81d50b5ac5474b07bdbadd5359993c80", | ||
| Category: category.Company, | ||
| Subcommands: []*cli.Command{ | ||
| { | ||
| Name: "repo-report", | ||
| Usage: "fetch the latest repoferee report", | ||
| Description: "Fetches the latest repoferee report which reports on repositories that conform to set rules. The rules can be found at https://github.com/sourcegraph/repoferee/blob/main/rules.yml", | ||
| Action: getRepofereeReport, | ||
| Flags: []cli.Flag{ | ||
| &cli.StringFlag{ | ||
| Name: "output-file", | ||
| DefaultText: "standard out", | ||
| Usage: "<filename> to write the report to", | ||
| Value: "", | ||
| Aliases: []string{"o"}, | ||
| }, | ||
| }, | ||
| }, | ||
| }, |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: security-semgrep-rules.semgrep-rules.generic.comment-tagging-rule
jhchabran
approved these changes
May 16, 2024
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
To fetch the latest results from https://repoferee.sgdev.org/results the request needs to be signed. This is because the report can contain sensitive repo names.
To make it easier to fetch report this PR adds the command
sg security repo-reportwhich will do the required signing of the request and fetch the results and then either print the report out to terminal or if the-ooption is specified, write the results out to fileTest plan
Tested locally