From 3e8254d540e9644f179e7bd4df3ce12c24b21df5 Mon Sep 17 00:00:00 2001 From: thomaschristory <9317624+thomaschristory@users.noreply.github.com> Date: Wed, 14 Oct 2026 21:15:21 +0000 Subject: [PATCH] ci: pin actions, set token permissions, add Dependabot config and security policy --- .github/dependabot.yml | 41 +++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 11 ++++++---- .github/workflows/publish.yml | 13 ++++++----- SECURITY.md | 12 ++++++++++ 4 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 SECURITY.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..03d60ae --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,41 @@ +version: 2 + +updates: + # Keeps the SHA-pinned actions in .github/workflows current: a PR bumps the SHA and the + # trailing version comment together. + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + # Wait a week after an action release before proposing it. + cooldown: + default-days: 7 + groups: + github-actions: + update-types: + - minor + - patch + open-pull-requests-limit: 5 + labels: + - dependencies + commit-message: + prefix: ci + + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + day: monday + cooldown: + default-days: 7 + groups: + python: + update-types: + - minor + - patch + open-pull-requests-limit: 5 + labels: + - dependencies + commit-message: + prefix: deps diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb8bf4a..48b53fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,14 +6,17 @@ on: pull_request: branches: [main] +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4 - name: Ruff check run: uvx ruff check . @@ -24,10 +27,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4 - name: Build package run: uv build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ed90b23..1e044f1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,20 +5,23 @@ on: tags: - "v*" +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4 - name: Build package run: uv build - name: Upload artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: dist path: dist/ @@ -31,13 +34,13 @@ jobs: id-token: write steps: - name: Download artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: name: dist path: dist/ - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4 - name: Publish to PyPI run: uv publish dist/* diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..ffb8cef --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,12 @@ +# Security policy + +## Supported versions + +Only the latest release gets security fixes. + +## Reporting a vulnerability + +Do not open a public issue. Use the private vulnerability reporting of GitHub: +[Report a vulnerability](https://github.com/thomaschristory/netbox-proxy-plugin/security/advisories/new) +(**Security > Report a vulnerability** on the repository). Only the maintainer sees the report. +The maintainer replies, fixes the problem, and publishes an advisory with the fix.