This repository hosts the source code of the OGC API - Features Micro Website: https://features.developer.ogc.org
The website is served from the gh-pages branch. Read this note, to understand how the website is generated.
Clone this repository with:
git clone https://github.com/opengeospatial/ogc-features-website.git
Then enter the folder:
cd ogc-features-website
Install dependencies:
npm install
Start development server:
npm start
Once you start the development server, the site will be available at:
http://localhost:3000
The development server is based on livereload (LiveReload):
- The site is built to the
dist/folder and served from there onhttp://localhost:3000. A file watcher rebuilds the pages, styles, scripts, and assets indist/on the fly whenever you edit files insrc/. - The LiveReload client script is injected into every rendered page, and connects back to the LiveReload server (running on
http://localhost:35729/livereload.jsby default) through a websocket. - Whenever a generated file in
dist/changes, the LiveReload server notifies the connected browser and the page is automatically refreshed, so the changes you make to the code are reflected in the browser.
You can change the ports with the PORT (website, default 3000) and LIVERELOAD_PORT (LiveReload server, default 35729) environment variables.
Tip
You can also run npm run start:debug to start the development server with a debugger attached to the build scripts.
Commit all your changes to the master branch. The gh-pages branch will be wiped each time, and generated dynamically from these GitHub actions, which create a static build. In a nutshell, you don't need to do anything to publish the website - the republish will be triggered automatically with each push to master.
The trivy.yml workflow ("Check vulnerabilities") uses
Trivy via aquasecurity/trivy-action
to scan the repository for security issues and to generate a
SPDX Bill of Materials (BOM) of the project's npm dependencies.
The workflow installs the npm dependencies and then runs trivy fs over the
repository with the vuln, misconfig, and secret scanners enabled:
- Vulnerabilities — known CVEs in the installed npm packages
(
CRITICALandHIGHseverities, unfixed findings ignored; the build fails when any are detected). Because all npm dependencies of this static site aredevDependencies,trivy-config.yamlsetspkg.include-dev-deps: trueso they are not skipped. - Misconfigurations — checks on configuration files found in the repository.
- Secrets — accidentally committed credentials, keys, or tokens.
The full dependency tree is scanned: the workflow runs npm install before
scanning, so node_modules is present.
The same Trivy run also produces an SPDX BOM of the installed dependencies:
| File | Format |
|---|---|
sbom.spdx.json |
SPDX SBOM (machine-readable) |
sbom.spdx.md |
Human-readable Markdown table generated from the SBOM |
Both files are committed to the repository (on pushes to the full-refactor
branch, after a timestamp normalization step so that consecutive runs with no
dependency changes produce an identical file) and are also uploaded as the
sbom workflow artifact (30-day retention).
The workflow triggers on:
| Event | Description |
|---|---|
| Push (any branch) | Runs on every push, except pushes that only change Markdown files |
| Pull request | Pull requests targeting the full-refactor branch |
| Release | When a release is published |
| Schedule | Daily at 08:00 UTC (keeps the scan current as new vulnerabilities are disclosed) |
| Workflow dispatch | Manually, from the GitHub Actions page |
Scheduled and manual runs report results and regenerate the SBOM artifacts, but do not commit anything to the repository.
docker run --rm -v "$PWD:/workdir" aquasec/trivy:latest fs /workdir --include-dev-deps --scanners vuln,misconfig,secret --severity CRITICAL,HIGHFor the SPDX BOM:
docker run --rm -v "$PWD:/workdir" aquasec/trivy:latest fs /workdir --format spdx-json --output /workdir/sbom.spdx.jsonThis website is a live project and we welcome contributions from the community! If you have suggestions for improvements, found a bug, or want to add new features, feel free to:
- Open an issue to start a discussion
- Submit a pull request with your proposed changes
We appreciate your support in making this website better!
This project is released under an MIT License