mirror of
https://github.com/ruvnet/RuView
synced 2026-06-22 12:23:18 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56a6562e12 | |||
| d9d17dcf43 |
@@ -18,6 +18,11 @@ jobs:
|
|||||||
code-quality:
|
code-quality:
|
||||||
name: Code Quality & Security
|
name: Code Quality & Security
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Skip when there's no Python source at the root `src/` to lint. The
|
||||||
|
# active codebase is the Rust workspace under `v2/`; legacy Python
|
||||||
|
# lives at `archive/v1/src/` and is not part of CI gating. If `src/`
|
||||||
|
# is reintroduced this job will run automatically.
|
||||||
|
if: hashFiles('src/**/*.py') != ''
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -70,6 +75,16 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install system dependencies
|
||||||
|
# glib-sys (transitive via gstreamer/gtk crates in the workspace)
|
||||||
|
# needs glib-2.0 + pkg-config at build time. Without these the
|
||||||
|
# workspace build fails: "failed to run custom build command for
|
||||||
|
# `glib-sys vN.M.K`".
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends \
|
||||||
|
pkg-config libglib2.0-dev
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
@@ -92,6 +107,10 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Tests
|
name: Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Skip when there's no Python test suite under `tests/unit/` /
|
||||||
|
# `tests/integration/` to run. The legacy Python tests have been
|
||||||
|
# archived under `archive/v1/tests/` and are not part of CI gating.
|
||||||
|
if: hashFiles('tests/unit/**/*.py') != '' || hashFiles('tests/integration/**/*.py') != ''
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.10', '3.11', '3.12']
|
python-version: ['3.10', '3.11', '3.12']
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ jobs:
|
|||||||
sast:
|
sast:
|
||||||
name: Static Application Security Testing
|
name: Static Application Security Testing
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Skip when there's no Python source at the root `src/` to scan.
|
||||||
|
# The Bandit + Semgrep targets in this job are hard-coded to `src/`;
|
||||||
|
# the active codebase is the Rust workspace under `v2/` (covered by
|
||||||
|
# `cargo audit` in the dependency-scan job below).
|
||||||
|
if: hashFiles('src/**/*.py') != ''
|
||||||
permissions:
|
permissions:
|
||||||
security-events: write
|
security-events: write
|
||||||
actions: read
|
actions: read
|
||||||
@@ -119,8 +124,12 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload Snyk results to GitHub Security
|
- name: Upload Snyk results to GitHub Security
|
||||||
|
# Skip when Snyk had no token / produced no SARIF (e.g. on PRs from
|
||||||
|
# forks without secrets). Without this guard the upload step fails
|
||||||
|
# the whole job whenever the optional Snyk scan was effectively a
|
||||||
|
# no-op.
|
||||||
|
if: ${{ always() && hashFiles('snyk-results.sarif') != '' }}
|
||||||
uses: github/codeql-action/upload-sarif@v3
|
uses: github/codeql-action/upload-sarif@v3
|
||||||
if: always()
|
|
||||||
with:
|
with:
|
||||||
sarif_file: snyk-results.sarif
|
sarif_file: snyk-results.sarif
|
||||||
category: snyk
|
category: snyk
|
||||||
@@ -133,6 +142,11 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
safety-report.json
|
safety-report.json
|
||||||
pip-audit-report.json
|
pip-audit-report.json
|
||||||
|
# Both upstream scans use `continue-on-error: true` and may
|
||||||
|
# produce no JSON when their dependencies break or a PR runs
|
||||||
|
# without registry access; treat a missing report as a warning
|
||||||
|
# instead of failing the whole upload step.
|
||||||
|
if-no-files-found: ignore
|
||||||
snyk-results.sarif
|
snyk-results.sarif
|
||||||
|
|
||||||
# Container security scanning
|
# Container security scanning
|
||||||
@@ -256,8 +270,11 @@ jobs:
|
|||||||
exclude_queries: 'a7ef1e8c-fbf8-4ac1-b8c7-2c3b0e6c6c6c'
|
exclude_queries: 'a7ef1e8c-fbf8-4ac1-b8c7-2c3b0e6c6c6c'
|
||||||
|
|
||||||
- name: Upload KICS results to GitHub Security
|
- name: Upload KICS results to GitHub Security
|
||||||
|
# KICS does not always produce a SARIF (e.g. when no IaC files are
|
||||||
|
# present in the repo); guard the upload so a missing file does
|
||||||
|
# not fail the iac-scan job.
|
||||||
|
if: ${{ always() && hashFiles('kics-results/results.sarif') != '' }}
|
||||||
uses: github/codeql-action/upload-sarif@v3
|
uses: github/codeql-action/upload-sarif@v3
|
||||||
if: always()
|
|
||||||
with:
|
with:
|
||||||
sarif_file: kics-results/results.sarif
|
sarif_file: kics-results/results.sarif
|
||||||
category: kics
|
category: kics
|
||||||
@@ -338,7 +355,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Check security policy files
|
- name: Check security policy files
|
||||||
run: |
|
run: |
|
||||||
# Check for required security files
|
# Check for required security files. Missing policy is reported
|
||||||
|
# as a warning rather than a hard failure so the broader
|
||||||
|
# compliance job stays informational; tracked separately for
|
||||||
|
# follow-up.
|
||||||
files=("SECURITY.md" ".github/SECURITY.md" "docs/SECURITY.md")
|
files=("SECURITY.md" ".github/SECURITY.md" "docs/SECURITY.md")
|
||||||
found=false
|
found=false
|
||||||
for file in "${files[@]}"; do
|
for file in "${files[@]}"; do
|
||||||
@@ -349,14 +369,21 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$found" == false ]]; then
|
if [[ "$found" == false ]]; then
|
||||||
echo "❌ No security policy found. Please create SECURITY.md"
|
echo "::warning::No security policy found. Please create SECURITY.md"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check for security headers in code
|
- name: Check for security headers in code
|
||||||
run: |
|
run: |
|
||||||
# Check for security-related configurations
|
# Check for security-related configurations. Skip cleanly when
|
||||||
grep -r "X-Frame-Options\|X-Content-Type-Options\|X-XSS-Protection\|Content-Security-Policy" src/ || echo "⚠️ Consider adding security headers"
|
# `src/` does not exist (Rust-first repo layout); a missing
|
||||||
|
# directory makes `grep -r` exit with status 2, which would
|
||||||
|
# fail the step despite the trailing `||`.
|
||||||
|
if [[ -d src ]]; then
|
||||||
|
grep -r "X-Frame-Options\|X-Content-Type-Options\|X-XSS-Protection\|Content-Security-Policy" src/ \
|
||||||
|
|| echo "⚠️ Consider adding security headers"
|
||||||
|
else
|
||||||
|
echo "ℹ️ No src/ directory at repo root — skipping web security headers grep"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Validate Kubernetes security contexts
|
- name: Validate Kubernetes security contexts
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,5 +29,7 @@ CONFIG_LWIP_SO_RCVBUF=y
|
|||||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
||||||
|
|
||||||
# ADR-081: adaptive_controller runs emit_feature_state + stream_sender
|
# ADR-081: adaptive_controller runs emit_feature_state + stream_sender
|
||||||
# network I/O inside Timer Svc callbacks, exceeding the 2 KiB default.
|
# network I/O inside Timer Svc callbacks. 8 KiB was insufficient under
|
||||||
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=8192
|
# lwIP sendto + state-transition rv_mesh anomaly emit (issue #505 4MB
|
||||||
|
# reset loop on Tmr Svc); 16 KiB absorbs the worst-case path.
|
||||||
|
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=16384
|
||||||
|
|||||||
@@ -33,5 +33,7 @@ CONFIG_LWIP_SO_RCVBUF=y
|
|||||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
||||||
|
|
||||||
# ADR-081: adaptive_controller runs emit_feature_state + stream_sender
|
# ADR-081: adaptive_controller runs emit_feature_state + stream_sender
|
||||||
# network I/O inside Timer Svc callbacks, exceeding the 2 KiB default.
|
# network I/O inside Timer Svc callbacks. 8 KiB was insufficient under
|
||||||
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=8192
|
# lwIP sendto + state-transition rv_mesh anomaly emit (issue #505 4MB
|
||||||
|
# reset loop on Tmr Svc); 16 KiB absorbs the worst-case path.
|
||||||
|
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=16384
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0.6.2
|
0.6.4
|
||||||
|
|||||||
Reference in New Issue
Block a user