From 2e62e771c91465bc12f3adf65ec0225fdc8aee88 Mon Sep 17 00:00:00 2001 From: Joshua Almeida Date: Thu, 22 Oct 2026 20:00:37 -0400 Subject: [PATCH] Security hardening: least-privilege workflow permissions, Dependabot, CodeQL, SECURITY.md --- .github/dependabot.yml | 6 ++++++ .github/workflows/codeql.yml | 42 ++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 3 +++ SECURITY.md | 28 ++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 SECURITY.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..5ace4600 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..7a393e71 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,42 @@ +name: "CodeQL" + +on: + push: + branches: [ "gh-pages" ] + pull_request: + branches: [ "gh-pages" ] + schedule: + - cron: "27 6 * * 1" + workflow_dispatch: + +permissions: + contents: read + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: javascript-typescript + build-mode: none + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e2856b4..9746db2e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,9 @@ on: branches: - gh-pages +permissions: + contents: read + jobs: run-script: runs-on: ubuntu-latest diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..562b7186 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,28 @@ +# Security Policy + +This repository (`fitzyracing1/api-docs`) is a personal fork of [nasa/api-docs](https://github.com/nasa/api-docs), maintained by Joshua Almeida ([@fitzyracing1](https://github.com/fitzyracing1)). + +## Reporting a Vulnerability + +Please **do not** report security vulnerabilities through public GitHub issues, discussions, or pull requests. + +Instead, report them privately to the fork maintainer, Joshua Almeida, using GitHub's +[private vulnerability reporting](https://github.com/fitzyracing1/api-docs/security/advisories/new) +for this repository. + +Please include as much of the following as you can: + +- The type of issue (e.g. injection, credential exposure, insecure configuration) +- The affected file(s), branch, or commit +- Step-by-step instructions to reproduce the issue +- Proof-of-concept or exploit code, if available +- The potential impact of the issue + +You can expect an acknowledgement within 7 days. Please allow reasonable time for a fix before any public disclosure. + +If the issue also affects the upstream project, please report it to NASA through the +upstream repository's own security policy as well. + +## Supported Versions + +Only the latest commit on this fork's default branch is supported with security fixes.