Run the checker without a server
The checker can run as a static site: plain files, no server and no database. A scheduled workflow scans every component on the component list, writes the results as JSON files and builds the site from them. Any static host can serve it, such as GitHub Pages.
The server mode stays. Whoever runs the server keeps the scan form, the admin pages and the rescan webhook.
How it works
- The component list,
config/repositories.yml, says which repositories to scan. SLAs are inconfig/slas.yml. Both change by pull request, and a check validates them. - Every night at 03:00 Amsterdam time, and when a maintainer starts it by hand, the workflow runs
npm run scan:static. It scans each repository with the same checks as the server and writes the data files. - When the scanned commit did not change since the last scan, it copies the code checks from there and runs only the checks that depend on the outside world, such as known vulnerabilities, the Docker image and usage. Every 7 days, after a change of the checker or its tools, and when a maintainer starts the workflow with full ticked, it runs every check.
- It compares each scan with the previous scan of the same kind of ref and the same checklist version. A criterion that went from pass to fail, a rating that lost a star, or a lost verdict is recorded as a drop, with the same fix terms as the server.
- It commits the data files to the
databranch, builds the site withnpm run build:staticand publishes it.
The data files
data/index.json one entry per repository
data/repositories/<host>/<owner>/<repo>/latest.json the latest analysis in full
data/repositories/<host>/<owner>/<repo>/history.json a short summary per analysis, and the dropslatest.json has the same shape as the API, so the pages read both the same way. history.json keeps per analysis only the date, version, scanned ref, checklist version, score, ratings, verdict, Maintained level, counts and open drops. Older runs show as a summary; only the latest run has a detail page. The files are published with the site, under /data, so anyone can reuse them.
The data lives on its own branch so nightly commits do not fill the history of the code, and a pull request on the code never conflicts with them.
Add your component
Open a pull request on the component list that adds an entry. Only url is required. For example:
- url: https://github.com/example-org/example-component
scanRef: latest-release
hints:
helm: [charts/example-component]
providers:
- name: Example Services
services: [maintenance, hosting]
url: https://example.org
contact: info@example.orgscanRef: what to scan,latest-release,default-branch, or a branch or tag name.hints: paths the checker would not find on its own:helm,docker,docsandapiSpecs.register: true for a register, whose API specification is checked as one.basisset: true when the component is in the Common Ground basisset.maintained: VNG decided to take the component into management.sinceis the day of the decision (YYYY-MM-DD),decisionthe https link to the published decision. Without it a component is at most Suitable. A component that should no longer be followed is removed from the list; its history stays.providers: optional services an organisation offers for the component. Each has anameand one or moreservices: maintenance, support, hosting, implementation or training.url,contact(a general address, no personal data) andsinceare optional. The provider of a component is always the owner of its repository; these entries show as "Also offers".
The pull request check validates the file against its schema, rejects duplicates, and tests that a new or changed repository is public. A missing publiccode.yml is a warning, not an error. After the merge, the component is scanned in the next nightly run, or sooner when a maintainer starts the workflow by hand.
Missing a component? Add it to the component list with a pull request. It is scanned in the next nightly run.
Trade-offs
- No scan on request. Results are at most one night old, or a manual run of the workflow.
- No admin pages. Scoring, the component list and SLAs change by pull request.
- Older runs keep a summary only. Their full results stay in the history of the data branch.
- The scans use the token of the workflow for the GitHub API. GitHub limits the requests per hour of that token, so a long list may need a token with a higher limit.
- The workflow uses Actions minutes, and GitHub stops a job after 6 hours. The runner scans one repository at a time by default and stops a single scan after 45 minutes; raise
--concurrencyfor a long list. - GitHub may delay scheduled runs at busy times, and switches them off in a repository without activity for 60 days.
With a server
Whoever runs the server adds components with the scan form, and the backend has a webhook route, POST /api/webhook. With it a repository registers itself for scheduled rescans and starts a rescan from its own CI, from GitHub Actions, GitLab CI or any other pipeline. The backend README describes the token and the request.
Hosting on code.overheid.nl
code.overheid.nl runs Forgejo (version 15.0.11, as its API reports), and Actions is switched on for repositories there. Forgejo Actions reads workflows in the GitHub syntax from .forgejo/workflows. The scan and build steps are plain shell and would run there unchanged. Not verified yet: whether shared runners are available, and where Forgejo would serve the site, because actions/deploy-pages is specific to GitHub Pages.