Skip to content

Commit

Permalink
Transfer to OSSF (#343)
Browse files Browse the repository at this point in the history
* chore: changed repo url

Signed-off-by: Theba Gomez <[email protected]>

* chore: project rename

Signed-off-by: Theba Gomez <[email protected]>

* chore: added gitignore rule for build folder

Signed-off-by: Theba Gomez <[email protected]>

---------

Signed-off-by: Theba Gomez <[email protected]>
  • Loading branch information
KoolTheba authored Jun 10, 2024
1 parent 6a73643 commit eb7ba17
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 23 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,6 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,react,node
# End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,react,node

build
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# openssf-scorecard-api-visualizer
# OSSF Scorecard Visualizer

The OpenSSF Scorecard Monitor Visualizer is a tool that provides a visual representation of the OpenSSF Scorecard data for monitoring the security status of open source projects. It fetches the scorecard data from the [OpenSSF Scorecard API](https://api.securityscorecards.dev/#/results) and presents it in a user-friendly and interactive visual format.

Expand Down Expand Up @@ -65,17 +65,17 @@ The Visualizer and the Comparator can be used outside the Monitor.

You have 3 options of visualization. Depending on which one you want to check, you should craft your own url as:

- Checks the latest Scorecard data available for a project: `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/${platform}/${org}/${repo}`
- Checks the Scorecard data for an specific commit (previously reported): `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/${platform}/${org}/${repo}/commit/{commitHash}`
- Compares two specific commits, previously reported: `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/{prevCommitHash}/{currentCommitHash}`
- Checks the latest Scorecard data available for a project: `https://ossf.github.io/scorecard-visualizer/#/projects/${platform}/${org}/${repo}`
- Checks the Scorecard data for an specific commit (previously reported): `https://ossf.github.io/scorecard-visualizer/#/projects/${platform}/${org}/${repo}/commit/{commitHash}`
- Compares two specific commits, previously reported: `https://ossf.github.io/scorecard-visualizer/#/projects/github.com/nodejs/node/compare/{prevCommitHash}/{currentCommitHash}`

> 👉 Please note that in order to retrieve data from the Scorecard API, it is necessary for organizations or repository owners to report their commits to the Scorecard. However, it's important to keep in mind that not all organizations report their commits, which may result in a `404 error` if the data is not available in the API. Please be aware that this behavior is expected and not indicative of a bug.
### Examples

- [Nodejs latest repository Scorecard](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node)
- [Nodejs specific commit Scorecard](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/commit/da80964a3d708ef3ae42d4424034f155ad37e07d)
- [Nodejs reported commits comparation](https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/da80964a3d708ef3ae42d4424034f155ad37e07d)
- [Nodejs latest repository Scorecard](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/nodejs/node)
- [Nodejs specific commit Scorecard](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/nodejs/node/commit/da80964a3d708ef3ae42d4424034f155ad37e07d)
- [Nodejs reported commits comparation](https://ossf.github.io/scorecard-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/da80964a3d708ef3ae42d4424034f155ad37e07d)

## Contributing

Expand All @@ -94,4 +94,4 @@ This project is licensed under the [Apache License Version 2.0](LICENSE).

## Support

If you encounter any issues or have questions about the OpenSSF Scorecard Monitor Visualizer, please [open an issue](https://github.com/KoolTheba/openssf-scorecard-api-visualizer/issues/new) on the GitHub repository.
If you encounter any issues or have questions about the OpenSSF Scorecard Monitor Visualizer, please [open an issue](https://github.com/ossf/scorecard-visualizer/issues/new) on the GitHub repository.
10 changes: 5 additions & 5 deletions cypress/e2e/comparator.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("Comparator", () => {
).as("getDataCurrentCommit");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
);
cy.wait("@getDataPreviousCommit"); // first try as react query behaves
cy.wait("@getDataPreviousCommit"); // second try
Expand Down Expand Up @@ -53,7 +53,7 @@ describe("Comparator", () => {
).as("getDataCurrentCommit");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
);
cy.wait("@getDataPreviousCommit"); // first try as react query behaves
cy.wait("@getDataPreviousCommit"); // second try
Expand Down Expand Up @@ -88,7 +88,7 @@ describe("Comparator", () => {
).as("getDataCurrentCommit");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
);
cy.wait("@getDataPreviousCommit"); // first try as react query behaves
cy.wait("@getDataCurrentCommit"); // first try as react query behaves
Expand Down Expand Up @@ -124,7 +124,7 @@ describe("Comparator", () => {
).as("getDataCurrentCommit");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node/compare/2ac5e9889aba461f5a54d320973d2574980d206b/077fd7d83d7d41695137c1af5b9be1d72250e69e",
);
cy.wait("@getDataPreviousCommit"); // first try as react query behaves
cy.wait("@getDataCurrentCommit"); // first try as react query behaves
Expand Down Expand Up @@ -165,7 +165,7 @@ describe("Comparator", () => {
"https://github.com/nodejs/node/commit/2ac5e9889aba461f5a54d320973d2574980d206b",
);

// @TODO: restore when https://github.com/KoolTheba/openssf-scorecard-api-visualizer/actions/runs/5457182231/jobs/9930918315?pr=106 is solved
// @TODO: restore when https://github.com/ossf/scorecard-visualizer/actions/runs/5457182231/jobs/9930918315?pr=106 is solved
// cy.get('[data-testid="date"]').should("contain", "Date: June 8, 2023");

cy.get('[data-testid="scorecard-version"]').should(
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/visualizer.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("Visualizer", () => {
).as("getData");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node",
);
cy.wait("@getData"); // first try as react query behaves
cy.wait("@getData"); // second try
Expand All @@ -34,7 +34,7 @@ describe("Visualizer", () => {
).as("getData");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/commit/19fa9f1bc47b0666be0747583bea8cb3d8ad5eb1",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node/commit/19fa9f1bc47b0666be0747583bea8cb3d8ad5eb1",
);
cy.wait("@getData"); // first try as react query behaves
cy.wait("@getData"); // second try
Expand All @@ -60,7 +60,7 @@ describe("Visualizer", () => {
).as("getData");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node",
);
cy.wait("@getData");
cy.get("h1").should("contain", "OpenSSF Scorecard for nodejs/node");
Expand Down Expand Up @@ -180,7 +180,7 @@ describe("Visualizer", () => {
).as("getData");

cy.visit(
"localhost:3000/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node/commit/50477fa35367bb76e5f56ac93d661b01a5578cec",
"localhost:3000/scorecard-visualizer/#/projects/github.com/nodejs/node/commit/50477fa35367bb76e5f56ac93d661b01a5578cec",
);
cy.wait("@getData");
cy.get("h1").should("contain", "OpenSSF Scorecard for nodejs/node");
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "openssf-scorecard-api-visualizer",
"name": "scorecard-visualizer",
"version": "1.0.0",
"private": true,
"dependencies": {
Expand All @@ -20,7 +20,7 @@
"typescript": "4.9.5",
"web-vitals": "3.5.0"
},
"homepage": "https://kooltheba.github.io/openssf-scorecard-api-visualizer",
"homepage": "https://ossf.github.io/scorecard-visualizer",
"scripts": {
"start": "react-scripts start",
"lint": "eslint .",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProjectComparator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function ProjectComparator() {
<span className="warning-message" data-testid="discrepancies">
{`Scorecard API missing: ${discrepancies.join(", ")} checks. See `}
<a
href="https://github.com/KoolTheba/openssf-scorecard-api-visualizer/tree/main#discrepancies-management"
href="https://github.com/ossf/scorecard-visualizer/tree/main#discrepancies-management"
target="_blank"
rel="noreferrer"
>
Expand Down

0 comments on commit eb7ba17

Please sign in to comment.