Skip to content

About

OGC API - Tiles micro website

Topics

Resources

Security policy

Stars

2 stars

Watchers

6 watching

Forks

Repository files navigation

README

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.

Quick Start 🚀

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

How the development server works

The development server is based on livereload (LiveReload):

  • The site is built to the dist/ folder and served from there on http://localhost:3000. A file watcher rebuilds the pages, styles, scripts, and assets in dist/ on the fly whenever you edit files in src/.
  • The LiveReload client script is injected into every rendered page, and connects back to the LiveReload server (running on http://localhost:35729/livereload.js by 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.

Note about Publishing the Website

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.

Security: Vulnerability Scanning & SBOM

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.

What it scans

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 (CRITICAL and HIGH severities, unfixed findings ignored; the build fails when any are detected). Because all npm dependencies of this static site are devDependencies, trivy-config.yaml sets pkg.include-dev-deps: true so 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.

SBOM generation

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).

When it runs

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.

Running the scan locally with docker

docker run --rm -v "$PWD:/workdir" aquasec/trivy:latest fs /workdir --include-dev-deps --scanners vuln,misconfig,secret --severity CRITICAL,HIGH

For the SPDX BOM:

 docker run --rm -v "$PWD:/workdir" aquasec/trivy:latest fs /workdir --format spdx-json --output /workdir/sbom.spdx.json

Contributing 🤝

This 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!

License

This project is released under an MIT License

License: MIT (dev-exercise-template)

About

OGC API - Tiles micro website

Topics

Resources

Security policy

Stars

2 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages