Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .github/dependency-review-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Suppressions for the "Dependency review" CI check — see SECURITY.md's
# "Dependency vulnerability remediation" section. Add a GHSA ID here only in
# the same pull request as a written justification for why the advisory
# doesn't apply to PSIRTMap, mirrored in docs/VEX.md.
fail-on-severity: low
allow-ghsas: []
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,19 @@ jobs:
echo "fix with: git rebase --signoff origin/${{ github.base_ref }}" >&2
exit 1
fi

dependency-review:
name: Dependency review
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
contents: read
pull-requests: write
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Scan dependency changes
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
config-file: ./.github/dependency-review-config.yml
44 changes: 44 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CodeQL

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "17 3 * * 1"

permissions:
contents: read

jobs:
analyze:
name: Analyze (Go)
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
security-events: write

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: false

- name: Initialize CodeQL
uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
category: "/language:go"
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ jobs:
build_archive linux amd64
build_archive windows amd64

go run github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@v1.12.0 \
mod -json -licenses -output "dist/psirtmap_${version}_sbom.cdx.json" .

(cd dist && sha256sum ./* > checksums.txt)

- name: Attest build provenance
Expand Down
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ process in [SECURITY.md](SECURITY.md).
Please do not open a pull request unless a SolonGate maintainer has explicitly
requested it. Unsolicited pull requests may be closed without review.

Maintainer-requested changes should be small, focused, tested, and accompanied
by documentation when they alter user-visible behavior.
Maintainer-requested changes should be small and focused. A change that alters
behavior must add or update tests in the automated suite, and must be
accompanied by documentation when it alters user-visible behavior.

Every commit must carry a `Signed-off-by` trailer certifying you have the
right to submit the change under the
Expand All @@ -55,6 +56,10 @@ The CI "DCO sign-off" check enforces this on every pull request.

## Maintainer development checks

CI runs these same checks automatically on every push to `main` and every
pull request, plus CodeQL static analysis and a dependency review (see
[SECURITY.md](SECURITY.md)).

```sh
gofmt -w .
git diff --check
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ carries a signed build provenance attestation you can verify with the
gh attestation verify psirtmap_<version>_<os>_<arch>.tar.gz --owner solongate
```

Each release also publishes a CycloneDX SBOM for PSIRTMap's own build
(`psirtmap_<version>_sbom.cdx.json`) covering its Go module dependencies and
their licenses.

Go users can install the latest tagged release directly:

```sh
Expand Down
59 changes: 59 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,65 @@ Reports about an upstream package or an OSV record, without a vulnerability in
PSIRTMap itself, should be sent to the relevant upstream project or data
provider.

## Secrets management

PSIRTMap's CI and release pipelines use no long-lived secrets. Authenticating
to GitHub (creating releases, attesting build provenance) relies entirely on
the ephemeral, auto-rotated `GITHUB_TOKEN` issued per workflow run, scoped by
the `permissions:` block in each workflow file in `.github/workflows/`.

If a future integration needs a long-lived credential, it will be stored as a
GitHub Actions encrypted secret, scoped to the minimum required workflow, and
accessible only to the maintainers listed in
[MAINTAINERS.md](docs/MAINTAINERS.md). A secret is rotated immediately if a
maintainer's access is revoked or compromise is suspected, and is never
committed to the repository or echoed in workflow logs.

## Dependency vulnerability remediation

`govulncheck` runs on every pull request and push to `main`, and the
"Dependency review" CI check blocks a pull request that introduces a
dependency with a known vulnerability or a package flagged as malicious in the
GitHub Advisory Database (see [CONTRIBUTING.md](CONTRIBUTING.md)).

Remediation targets, measured from the date a vulnerability is first reported
against a dependency PSIRTMap ships:

| Severity | Remediate within |
|---|---|
| Critical | 7 days |
| High | 14 days |
| Medium | 30 days |
| Low | 90 days |

A release is not tagged while an applicable, unresolved vulnerability is open
against a dependency shipped in that release.

An advisory is suppressed only when a maintainer determines it does not apply
to PSIRTMap — for example, the vulnerable code path is unreachable or the
affected feature isn't built or used. Suppressions are declared explicitly as
an allowed GHSA ID in `.github/dependency-review-config.yml`, with the
justification recorded in the pull request that adds the suppression and
mirrored in the [VEX document](docs/VEX.md). A suppressed advisory still
follows the remediation targets above if it's later found to apply.

## Static analysis remediation

CodeQL performs static application security testing on every pull request and
push to `main`, and weekly on a schedule to pick up newly published queries.
Alerts appear under the repository's Security tab.

Remediation targets, measured from the date CodeQL first flags an alert:

| Severity | Remediate within |
|---|---|
| Critical / high (error) | 14 days |
| Medium (warning) | 30 days |
| Low (note) | 90 days |

A release is not tagged while an unresolved critical- or high-severity CodeQL
alert is open against code shipped in that release.

## Offline feed trust

The authenticated-feed controls in this section are implemented on `main` and
Expand Down
5 changes: 5 additions & 0 deletions docs/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ triaging private security advisories.
Other collaborators may hold read access for review and testing but do not
have merge, release, or security-advisory permissions.

Granting anyone admin, maintain, or write access — including adding a name to
the table above — requires agreement from both existing maintainers before the
access change is made, confirming the person's role and need for that level
of access.

See [CONTRIBUTING.md](../CONTRIBUTING.md) for how changes are accepted and
[SECURITY.md](../SECURITY.md) for how to reach maintainers privately about a
vulnerability.
28 changes: 28 additions & 0 deletions docs/VEX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Vulnerability Exploitability eXchange (VEX)

This document tracks third-party vulnerabilities that `govulncheck` or the CI
dependency review flags against a component PSIRTMap depends on, where a
maintainer has determined the vulnerability does not affect PSIRTMap. It is
maintained alongside the
[dependency vulnerability remediation policy](../SECURITY.md#dependency-vulnerability-remediation).

No entries currently apply: every vulnerability flagged to date has been
remediated by upgrading the affected dependency rather than assessed as
non-exploitable.

## Entry format

Each entry records, at minimum:

| Field | Description |
|---|---|
| Vulnerability ID | CVE or GHSA identifier |
| Component | Affected module and version |
| Status | `not_affected`, `affected`, or `fixed` |
| Justification | Why the vulnerability does not affect PSIRTMap, e.g. the vulnerable code path is unreachable or the affected feature isn't built or used |
| Assessed by | Maintainer who made the determination |
| Date | Date of assessment |

A `not_affected` entry is also recorded as a suppression in
`.github/dependency-review-config.yml`, with the pull request that adds it
linked here for traceability.
Loading