Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Checks are organized in `check sets`. Each `check set` defines a number of check

The CLOMonitor's linter can also be run locally or from CI workflows. This can be done by using the [container image](https://gallery.ecr.aws/clomonitor/linter) provided or by building the CLI tool from the source.

CLOMonitor delegates some of the security checks to [OpenSSF Scorecard](https://github.com/ossf/scorecard). When building from the source, you'll need to [install it](https://github.com/ossf/scorecard#installation) before running `clomonitor-linter` locally. The container image already includes the `scorecard` binary, so if you opt for using it you are ready to go.
CLOMonitor delegates some of the security checks to [OpenSSF Scorecard](https://github.com/ossf/scorecard) and the agent readiness checks to [AFDocs](https://afdocs.dev). When building from the source, you'll need to install them ([scorecard](https://github.com/ossf/scorecard#installation), [afdocs](https://www.npmjs.com/package/afdocs)) before running `clomonitor-linter` locally. The container image already includes both binaries, so if you opt for using it you are ready to go.

Both CLOMonitor and Scorecard use the GitHub GraphQL API for some checks, which requires authentication. A GitHub token (with `public_repo` scope) **must** be provided via the `GITHUB_TOKEN` environment variable to authenticate those requests.

Expand Down
13 changes: 12 additions & 1 deletion clomonitor-apiserver/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,11 @@ mod tests {
check_sets: vec![CheckSet::Code],
score: Some(Score {
global: 99.999_999_999_999_99,
global_weight: 5,
global_weight: 6,
documentation: Some(100.0),
documentation_weight: Some(1),
agent_readiness: Some(100.0),
agent_readiness_weight: Some(1),
license: Some(100.0),
license_weight: Some(1),
best_practices: Some(100.0),
Expand All @@ -748,6 +750,15 @@ mod tests {
summary_table: Some(CheckOutput::passed()),
website: Some(CheckOutput::passed()),
},
agent_readiness: AgentReadiness {
authentication: Some(CheckOutput::passed()),
content_discoverability: Some(CheckOutput::passed()),
content_structure: Some(CheckOutput::passed()),
markdown_availability: Some(CheckOutput::passed()),
observability: Some(CheckOutput::passed()),
page_size: Some(CheckOutput::passed()),
url_stability: Some(CheckOutput::passed()),
},
license: License {
license_approved: Some(CheckOutput::passed()),
license_scanning: Some(
Expand Down
25 changes: 18 additions & 7 deletions clomonitor-apiserver/src/testdata/repository-report.golden.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

### Checks passed per category

| Category | Score |
| :------------- | ----------------------------------------------: |
| Documentation | 100% |
| License | 100% |
| Best Practices | 100% |
| Security | 100% |
| Legal | 100% |
| Category | Score |
| :-------------- | -----------------------------------------------: |
| Documentation | 100% |
| Agent Readiness | 100% |
| License | 100% |
| Best Practices | 100% |
| Security | 100% |
| Legal | 100% |

## Checks

Expand All @@ -32,6 +33,16 @@
- [x] Summary Table ([_docs_](https://clomonitor.io/docs/topics/checks/#summary-table))
- [x] Website ([_docs_](https://clomonitor.io/docs/topics/checks/#website))

### Agent Readiness [100%]

- [x] Authentication ([_docs_](https://clomonitor.io/docs/topics/checks/#authentication))
- [x] Content discoverability ([_docs_](https://clomonitor.io/docs/topics/checks/#content-discoverability))
- [x] Content structure ([_docs_](https://clomonitor.io/docs/topics/checks/#content-structure))
- [x] Markdown availability ([_docs_](https://clomonitor.io/docs/topics/checks/#markdown-availability))
- [x] Observability ([_docs_](https://clomonitor.io/docs/topics/checks/#observability))
- [x] Page size ([_docs_](https://clomonitor.io/docs/topics/checks/#page-size))
- [x] URL stability ([_docs_](https://clomonitor.io/docs/topics/checks/#url-stability))

### License [100%]

- [x] Apache-2.0 ([_docs_](https://clomonitor.io/docs/topics/checks/#spdx-id))
Expand Down
27 changes: 20 additions & 7 deletions clomonitor-apiserver/templates/repository-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

### Checks passed per category

| Category | Score |
| :------------- | ----------------------------------------------: |
| Documentation | {{ category_score(score.documentation) }} |
| License | {{ category_score(score.license) }} |
| Best Practices | {{ category_score(score.best_practices) }} |
| Security | {{ category_score(score.security) }} |
| Legal | {{ category_score(score.legal) }} |
| Category | Score |
| :-------------- | -----------------------------------------------: |
| Documentation | {{ category_score(score.documentation) }} |
| Agent Readiness | {{ category_score(score.agent_readiness) }} |
| License | {{ category_score(score.license) }} |
| Best Practices | {{ category_score(score.best_practices) }} |
| Security | {{ category_score(score.security) }} |
| Legal | {{ category_score(score.legal) }} |

## Checks

Expand All @@ -35,6 +36,18 @@
{{ check("summary-table", "Summary Table", report.documentation.summary_table) -}}
{{ check("website", "Website", report.documentation.website) -}}

{%- endif %}
{%- if let Some(value) = score.agent_readiness %}
### Agent Readiness [{{ value.round() }}%]

{{ check("authentication", "Authentication", report.agent_readiness.authentication) -}}
{{ check("content-discoverability", "Content discoverability", report.agent_readiness.content_discoverability) -}}
{{ check("content-structure", "Content structure", report.agent_readiness.content_structure) -}}
{{ check("markdown-availability", "Markdown availability", report.agent_readiness.markdown_availability) -}}
{{ check("observability", "Observability", report.agent_readiness.observability) -}}
{{ check("page-size", "Page size", report.agent_readiness.page_size) -}}
{{ check("url-stability", "URL stability", report.agent_readiness.url_stability) -}}

{%- endif %}
{%- if let Some(value) = score.license %}
### License [{{ value.round() }}%]
Expand Down
Loading
Loading