diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 00000000..8fdf9939 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,10 @@ +# CodeQL configuration +# Reduce noise from files that are not shipped to production and are +# intentionally HTML/string-manipulating (build-time sanitizers, link checkers). +# Real UI XSS in src/modules/* is reviewed separately. +paths-ignore: + - scripts/ + - node_modules/ + +queries: + - uses: security-and-quality diff --git a/.github/codeql/custom-queries.yml b/.github/codeql/custom-queries.yml deleted file mode 100644 index 62dd7739..00000000 --- a/.github/codeql/custom-queries.yml +++ /dev/null @@ -1,32 +0,0 @@ -# CodeQL Custom Queries Configuration -# This file disables false positive queries for our project - -# Disable js-sanitization queries that produce false positives -# Our project uses multiple sanitization layers at build time -queries: - - name: "disable-js-sanitization" - message: "Disabled - project uses Hugo sanitization and content filtering" - kind: "warning" - severity: "warning" - confidence: "low" - tags: ["security"] - text: | - /** - * @kind problem - * @name js-sanitization - * @message Disabled for this project - * @tag security - */ - -# Add path queries but mark them as informational -paths: - - name: "path-injection" - confidence: "low" - tags: ["security"] - -# Security query overrides -overrides: - - name: "js/sanitization" - message: "Sanitization handled at build-time by Hugo and sanitize-generated.cjs" - severity: "warning" - confidence: "low" \ No newline at end of file diff --git a/.github/workflows/analytics.yml b/.github/workflows/analytics.yml index cd8c7baa..619230ff 100644 --- a/.github/workflows/analytics.yml +++ b/.github/workflows/analytics.yml @@ -8,6 +8,8 @@ on: - cron: '0 6 * * *' workflow_dispatch: +permissions: + contents: read jobs: site-analytics: name: 📊 Site Analytics Report diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 792d6005..8cb675c1 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -1 +1,4 @@ # + +permissions: + contents: read diff --git a/.github/workflows/dependency-update.yml b/.github/workflows/dependency-update.yml index fa295158..865e66b1 100644 --- a/.github/workflows/dependency-update.yml +++ b/.github/workflows/dependency-update.yml @@ -6,6 +6,9 @@ on: - cron: '0 3 * * 0' workflow_dispatch: +permissions: + contents: write + pull-requests: write jobs: update-dependencies: name: 🔄 Update Dependencies diff --git a/.github/workflows/deploy-dao.yml b/.github/workflows/deploy-dao.yml index 008aad41..4d75b3ef 100644 --- a/.github/workflows/deploy-dao.yml +++ b/.github/workflows/deploy-dao.yml @@ -14,6 +14,8 @@ on: branches: [main] paths: ['contracts/**', 'hardhat.config.cjs', 'scripts/deploy-dao.cjs', 'package*.json'] +permissions: + contents: read jobs: test: name: DAO contract tests diff --git a/.github/workflows/link-repair.yml b/.github/workflows/link-repair.yml index 5e3b7770..04382160 100644 --- a/.github/workflows/link-repair.yml +++ b/.github/workflows/link-repair.yml @@ -15,6 +15,9 @@ on: required: false default: '0.6' +permissions: + contents: write + pull-requests: write jobs: link-repair: runs-on: ubuntu-latest diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 27aaf1ee..fc95bdb4 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -10,6 +10,8 @@ on: - cron: '0 1 * * *' workflow_dispatch: +permissions: + contents: read jobs: lighthouse: name: 🌐 Lighthouse Performance Audit diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index 3e8b1435..f7f360bf 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -67,7 +67,7 @@ jobs: with: languages: ${{ matrix.languages }} # Enable security-extended queries - config-file: .github/codeql/custom-queries.yml + config-file: .github/codeql/codeql-config.yml - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/sync_gists.yml b/.github/workflows/sync_gists.yml index 1fc0e15e..8b5a474e 100644 --- a/.github/workflows/sync_gists.yml +++ b/.github/workflows/sync_gists.yml @@ -10,6 +10,8 @@ on: - cron: "0 0 * * *" # Задачи, которые будет выполнять Action +permissions: + contents: read jobs: sync: # Использовать последнюю версию Ubuntu для выполнения diff --git a/.github/workflows/test-rnd.yml b/.github/workflows/test-rnd.yml index 52b05724..83f72eaf 100644 --- a/.github/workflows/test-rnd.yml +++ b/.github/workflows/test-rnd.yml @@ -36,6 +36,8 @@ on: - 'tailwind.config.js' workflow_dispatch: +permissions: + contents: read jobs: rnd-unit: name: 🧪 R&D Unit tests (jest — same suites as prod; src/ suites are quarantined) diff --git a/.github/workflows/vr-export.yml b/.github/workflows/vr-export.yml index 99353d8d..0d0b63a0 100644 --- a/.github/workflows/vr-export.yml +++ b/.github/workflows/vr-export.yml @@ -16,6 +16,9 @@ on: required: false default: 'glb' +permissions: + contents: write + pull-requests: write jobs: generate-vr-scene: runs-on: ubuntu-latest