Skip to content

Commit 059d0f8

Browse files
authored
chore: refactor to use new OSSF Scorecard visualizer URL (#78)
Signed-off-by: Ulises Gascón <[email protected]>
1 parent 01de350 commit 059d0f8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ If you would like to contribute to the documentation, please feel free to open a
2323

2424
- Easy to use with great customization
2525
- Easy to patch the scoring as the reports includes a direct link to [StepSecurity](https://app.stepsecurity.io)
26-
- Easy way to visualize the scorecard results with [The Scorecard Visualizer](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node) or [deps.dev](https://deps.dev/project/github/nodejs%2Fnode)
27-
- Cutting-edge feature that effortlessly compares OpenSSF scorecards between previous and current commits with [The Scorecard Visualizer Comparator](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/19fa9f1bc47b0666be0747583bea8cb3d8ad5eb1)
26+
- Easy way to visualize the scorecard results with [The Scorecard Visualizer](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/nodejs/node) or [deps.dev](https://deps.dev/project/github/nodejs%2Fnode)
27+
- Cutting-edge feature that effortlessly compares OpenSSF scorecards between previous and current commits with [The Scorecard Visualizer Comparator](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/nodejs/node/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/19fa9f1bc47b0666be0747583bea8cb3d8ad5eb1)
2828
- Discovery mode: list all the repos in one or many organizations that are already being tracked with [OpenSSF Scorecard](https://github.com/ossf/scorecard)
2929
- Reporting in Markdown with essential information (hash, date, score) and comparative against the prior score
3030
- Self-hosted: The reporting data is stored in JSON format (including previous records) in the repo itself
@@ -129,7 +129,7 @@ jobs:
129129
- `report-start-tag` Defines the start tag, default `<!-- OPENSSF-SCORECARD-MONITOR:START -->`
130130
- `report-end-tag`: Defines the closing tag, default `<!-- OPENSSF-SCORECARD-MONITOR:END -->`
131131
- `render-badge`: Defines if the OpenSSF badge must be rendered in the reportor to only show the score
132-
- `report-tool`: Defines the reporting review tool in place: `scorecard-visualizer` [Example](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node) or `deps.dev` [Example](https://deps.dev/project/github/nodejs%2Fnode), by default `scorecard-visualizer`
132+
- `report-tool`: Defines the reporting review tool in place: `scorecard-visualizer` [Example](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/nodejs/node) or `deps.dev` [Example](https://deps.dev/project/github/nodejs%2Fnode), by default `scorecard-visualizer`
133133

134134
### Outputs
135135

__tests__/__snapshots__/utils.test.js.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ exports[`Utils generateReportContent Should render template with scorecard-visua
1919
2020
| Repository | Commit | Score | Date | Score Delta | Report | StepSecurity |
2121
| -- | -- | -- | -- | -- | -- | -- |
22-
| [fake-org/fake-repo](https://github.com/fake-org/fake-repo) | [846b3dd](https://github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo/badge)](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo) | 2023-02-20 | 5 / [Details](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/fake-org/fake-repo/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [View](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [Fix it](https://app.stepsecurity.io/securerepo?repo=fake-org/fake-repo) |
22+
| [fake-org/fake-repo](https://github.com/fake-org/fake-repo) | [846b3dd](https://github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo/badge)](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo) | 2023-02-20 | 5 / [Details](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/fake-org/fake-repo/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [View](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [Fix it](https://app.stepsecurity.io/securerepo?repo=fake-org/fake-repo) |
2323
2424
_Report generated by [ossf/scorecard-monitor](https://github.com/ossf/scorecard-monitor)._"
2525
`;
@@ -31,7 +31,7 @@ exports[`Utils generateReportContent Should render template with scores and titl
3131
3232
| Repository | Commit | Score | Date | Score Delta | Report | StepSecurity |
3333
| -- | -- | -- | -- | -- | -- | -- |
34-
| [fake-org/fake-repo](https://github.com/fake-org/fake-repo) | [846b3dd](https://github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | 10 | 2023-02-20 | 5 / [Details](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/fake-org/fake-repo/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [View](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [Fix it](https://app.stepsecurity.io/securerepo?repo=fake-org/fake-repo) |
34+
| [fake-org/fake-repo](https://github.com/fake-org/fake-repo) | [846b3dd](https://github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | 10 | 2023-02-20 | 5 / [Details](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/fake-org/fake-repo/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [View](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [Fix it](https://app.stepsecurity.io/securerepo?repo=fake-org/fake-repo) |
3535
3636
_Report generated by [ossf/scorecard-monitor](https://github.com/ossf/scorecard-monitor)._"
3737
`;
@@ -43,7 +43,7 @@ exports[`Utils generateReportContent Should render template with scores only 1`]
4343
4444
| Repository | Commit | Score | Date | Score Delta | Report | StepSecurity |
4545
| -- | -- | -- | -- | -- | -- | -- |
46-
| [fake-org/fake-repo](https://github.com/fake-org/fake-repo) | [846b3dd](https://github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo/badge)](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo) | 2023-02-20 | 5 / [Details](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/fake-org/fake-repo/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [View](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [Fix it](https://app.stepsecurity.io/securerepo?repo=fake-org/fake-repo) |
46+
| [fake-org/fake-repo](https://github.com/fake-org/fake-repo) | [846b3dd](https://github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo/badge)](https://api.securityscorecards.dev/projects/github.com/fake-org/fake-repo) | 2023-02-20 | 5 / [Details](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/fake-org/fake-repo/compare/39a08ee8b8d3818677eb823cb566f36b1b1c4671/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [View](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/fake-org/fake-repo/commit/846b3ddb5f75d95235e94d9eb52e920f4a067338) | [Fix it](https://app.stepsecurity.io/securerepo?repo=fake-org/fake-repo) |
4747
4848
_Report generated by [ossf/scorecard-monitor](https://github.com/ossf/scorecard-monitor)._"
4949
`;

src/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ const saveScore = ({ database, platform, org, repo, score, date, commit }) => {
4444

4545
const generateReportUrl = reportTool => (org, repo, commit, prevCommit) => {
4646
if (reportTool === 'scorecard-visualizer' && !prevCommit) {
47-
return `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/${org}/${repo}/commit/${commit}`
47+
return `https://ossf.github.io/scorecard-visualizer/#/projects/github.com/${org}/${repo}/commit/${commit}`
4848
}
4949
if (reportTool === 'scorecard-visualizer' && prevCommit) {
50-
return `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/${org}/${repo}/compare/${prevCommit}/${commit}`
50+
return `https://ossf.github.io/scorecard-visualizer/#/projects/github.com/${org}/${repo}/compare/${prevCommit}/${commit}`
5151
}
5252
return `https://deps.dev/project/github/${org.toLowerCase()}%2F${repo.toLowerCase()}`
5353
}

0 commit comments

Comments
 (0)