ossf / scorecard

OpenSSF Scorecard - Security health metrics for Open Source
https://scorecard.dev
Apache License 2.0
4.61k stars 500 forks source link

:bug: Added CLI output for --probes #4391

Closed eddie-knight closed 3 days ago

eddie-knight commented 1 month ago

What kind of change does this PR introduce?

:bug: Bugfix

What is the current behavior?

% go run main.go --repo=github.com/ossf-tests/scorecard-check-branch-protection-e2e --probes=fuzzed
Starting probe [fuzzed]
Finished probe fuzzed
Aggregate score: ?

Check scores:
|-------|------|--------|---------------------------|
| SCORE | NAME | REASON | DOCUMENTATION/REMEDIATION |
|-------|------|--------|---------------------------|

What is the new behavior (if this is a feature change)?**

% go run main.go --repo=github.com/ossf-tests/scorecard-check-branch-protection-e2e --probes=fuzzed
Starting probe [fuzzed]
Finished probe fuzzed
[fuzzed] Remediation required: Setup one of tools we currently detect https://github.com/ossf/scorecard/blob/main/docs/checks/fuzzing/README.md.

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to the release-note

(In particular, describe what changes users might need to make in their application as a result of this pull request.)

Cleaned up the CLI output when running specific probes via --probes
github-actions[bot] commented 2 weeks ago

This pull request has been marked stale because it has been open for 10 days with no activity

spencerschrock commented 2 weeks ago

Cleaned up the CLI output when running specific probes via --probes

I'll note there's also --format probe which will display everything in a probe specific JSON format. But adding more detail to the default output seems reasonable too.

go run main.go --repo=github.com/ossf-tests/scorecard-check-branch-protection-e2e --probes=fuzzed --format probe | jq
{
  "date": "2024-11-04",
  "repo": {
    "name": "github.com/ossf-tests/scorecard-check-branch-protection-e2e",
    "commit": "12ae42962014ee9aeb01d991ee2cd799ad6de659"
  },
  "scorecard": {
    "version": "devel",
    "commit": "unknown"
  },
  "findings": [
    {
      "remediation": {
        "text": "Setup one of tools we currently detect https://github.com/ossf/scorecard/blob/main/docs/checks/fuzzing/README.md.",
        "markdown": "Setup one of [tools we currently detect](https://github.com/ossf/scorecard/blob/main/docs/checks/fuzzing/README.md).",
        "effort": 3
      },
      "probe": "fuzzed",
      "message": "no fuzzer integrations found",
      "outcome": "False"
    }
  ]
}
eddie-knight commented 3 days ago

I lost momentum on this effort, and I'm not sure it's entirely relevant since we now know that there is a solution via --output. I'm closing this for now to clear it from the repo's PR backlog.