Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
7db92e0
Check pt
matteius Oct 31, 2026
ff6a7d6
T1: Inventory current security and quality findings
matteius Oct 31, 2026
8d715d7
T2: Map application, API, and rename ownership
matteius Oct 31, 2026
f1ab93b
T4: Measure and gate web asset budgets
matteius Oct 31, 2026
561d235
T3: map operational coverage and archive native baseline
matteius Oct 31, 2026
29eef18
T6: Implement finding identity and exception policy checks
matteius Oct 31, 2026
27e4d57
T6: Track eslint job-log fixture (ignored by *.log rule)
matteius Oct 31, 2026
a764b6c
T11: Specify Streams pilot contracts and reviewed fixtures
matteius Oct 31, 2026
c285a0c
fix(quality): require recorded approval for findings exceptions
matteius Oct 31, 2026
6111c78
docs: record resumed engineering foundation execution
matteius Oct 31, 2026
e054470
T5: record target profiles and deferred runtime calibration
matteius Oct 31, 2026
17de815
T8: Establish strict Preact TypeScript and Jest infrastructure
matteius Oct 31, 2026
3eb4d25
T7: materialize bounded remediation tasks and closure dependencies
matteius Oct 31, 2026
f9b2f0c
T7: normalize expansion record whitespace
matteius Oct 31, 2026
4a390c0
T7: verify inserted plan dependencies against remediation map
matteius Oct 31, 2026
56f7300
T9: establish strict test compiler and bounded repair tasks
matteius Oct 31, 2026
d36e4e6
T9.1: check load and page-helper type boundaries
matteius Oct 31, 2026
713b302
docs(quality): prepare concrete dependency and exception reviews
matteius Oct 31, 2026
90f26a8
T9.2: type media elements and mocked Playwright routes
matteius Oct 31, 2026
de3fea4
docs: integrate remediation and test typing execution graph
matteius Oct 31, 2026
688eb33
T9.3: require complete timeline and snapshot fixtures
matteius Oct 31, 2026
b0bcf4c
T9.4: verify strict test coverage and narrow legacy JS interop
matteius Oct 31, 2026
2e7b8e5
docs: select bounded stream-state disposal improvement
matteius Oct 31, 2026
30aecdf
T12: Generate typed contracts and standalone boundary validators
matteius Oct 31, 2026
a3f617b
T10: enforce typed lint rules and stable migration identities
matteius Oct 31, 2026
a69d3ba
T10.1: add catalog keys for uncovered visible attributes
matteius Oct 31, 2026
f2b93b6
T10.2: localize settings and stream editor attribute text
matteius Oct 31, 2026
6591c33
T10.1: preserve translated action names in shortcut fallback labels
matteius Oct 31, 2026
4f82c1e
T10.3: localize live and recording attributes and close lint checks
matteius Oct 31, 2026
a6a83c8
docs: record typed foundation closure and pending exceptions
matteius Oct 31, 2026
1de1fa7
T13: isolate native and API runs with verified process ownership
matteius Oct 31, 2026
7a30414
T14.1: Capture scanner provenance and enforce explicit lane scope
matteius Oct 31, 2026
172d5fb
T31.1: reproduce shutdown registry deadlock and mutex disposal imbalance
matteius Oct 31, 2026
a3074ea
T31.1: leave a spare slot to prove shutdown rejects admission
matteius Oct 31, 2026
9a7e618
T31.2: release registry lock around shutdown stops and dispose both m…
matteius Oct 31, 2026
00f9394
T31.3: verify disposal and graceful go2rtc shutdown on committed fix
matteius Oct 31, 2026
b675fb5
Record verified shutdown fix and bounded integration follow-ups
matteius Oct 31, 2026
3c15c0d
T15.1: route npm and CI integration checks through owned runners
matteius Oct 31, 2026
8f11a3a
test: verify policy self-update denials preserve account state
matteius Oct 31, 2026
486a3a8
test: require asynchronous stream deletion completion
matteius Oct 31, 2026
cb8f006
test: reproduce false acceptance when delete worker cannot launch
matteius Oct 31, 2026
853c0d9
fix: reject delete requests when worker launch fails
matteius Oct 31, 2026
a737c4f
docs: record delete launch failure red and green evidence
matteius Oct 31, 2026
525f4d6
Track API verification and independent foundation status integration
matteius Oct 31, 2026
22012e6
Verify public media proxy advisory fix with sanitizer regressions
matteius Oct 31, 2026
0901a9d
ci: capture same-run scanner provenance and enforce findings policy
matteius Oct 31, 2026
43c65a1
test: reproduce false acceptance when update worker cannot launch
matteius Oct 31, 2026
2da05c1
fix: reject stream updates when worker launch fails
matteius Oct 31, 2026
dc292a0
docs: record update launch failure and completion evidence
matteius Oct 31, 2026
0eb7e5a
test(storage): reproduce isolated retention and write failure gaps
matteius Oct 31, 2026
caf2328
ci: register independent foundation checks and proposed required stat…
matteius Oct 31, 2026
0e1bebc
Record integrated foundation checks and gate storage fixes on reprodu…
matteius Oct 31, 2026
d86c15d
Materialize truthful shutdown timeout regression and bounded fix
matteius Oct 31, 2026
6d25465
fix(storage): retain legacy metadata while its root is unavailable
matteius Oct 31, 2026
e56fc16
fix(recording): stop segments on read-only storage writes
matteius Oct 31, 2026
4deb2b4
docs(quality): record passing storage recovery integration
matteius Oct 31, 2026
4a7f591
Record verified storage recovery and clarify segment overlap tolerance
matteius Oct 31, 2026
f2b1282
test: distinguish coordinator timeout from actual stopped state
matteius Oct 31, 2026
9f45d34
docs(quality): clarify historical media oracle failure
matteius Oct 31, 2026
7b5acd8
docs: record coordinator timeout red evidence
matteius Oct 31, 2026
4bb5cae
fix: preserve truthful coordinator timeout and component state
matteius Oct 31, 2026
12dffcd
ci: build and run verified native foundation regressions
matteius Oct 31, 2026
4c513e4
test: exercise real media recovery and record path collision evidence
matteius Oct 31, 2026
c80872e
docs: record truthful shutdown wait sanitizer evidence
matteius Oct 31, 2026
8728048
Fence real recording collision and record native CI integration
matteius Oct 31, 2026
233859a
fix(web): use native buttons for header profile actions
matteius Oct 31, 2026
0a811fe
test: qualify real lifecycle continuity and retain recovery findings
matteius Oct 31, 2026
4ac385d
Verify bundled API isolation and source execution security regressions
matteius Oct 31, 2026
29b55fd
fix(web): make mobile menu container programmatically focusable
matteius Oct 31, 2026
c0f100e
Track verified advisory and keyboard fixes plus stale-media recovery …
matteius Oct 31, 2026
3b62c68
fix: reserve unique MP4 output paths before recording segments
matteius Oct 31, 2026
7da0fa8
test: reject truncated media during stale recording recovery
matteius Oct 31, 2026
9a2de3c
Record collision fix and require durable stale-deletion guards
matteius Oct 31, 2026
fe93b78
fix(web): distinguish dialog backdrops from action controls
matteius Oct 31, 2026
57b1a23
test: preserve old recordings still owned by live writers
matteius Oct 31, 2026
8ad4840
fix: validate stale media and bound recovery scan progress
matteius Oct 31, 2026
12bf843
Record dialog boundary fixes and preserve cross-task evidence
matteius Oct 31, 2026
3a4bc32
docs: record stale media validation and bounded scan evidence
matteius Oct 31, 2026
4ee0e58
test: require durable stale deletion guards on historical upgrade
matteius Oct 31, 2026
f01ea20
Exercise collision and stale-media regressions in native CI
matteius Oct 31, 2026
586d8d8
fix: discard stale recording session when storage pressure pauses writes
matteius Oct 31, 2026
73fb07e
Verify private advisory dispositions against current source regressions
matteius Oct 31, 2026
99a29f6
feat: persist guarded stale recording deletion identities
matteius Oct 31, 2026
0b824e8
Close verified media recovery and advisory review tasks
matteius Oct 31, 2026
5f0f27e
Keep pressure-pause session regression in native CI
matteius Oct 31, 2026
ae59513
test: preserve stale recovery candidates and delayed replacements
matteius Oct 31, 2026
359ade6
fix(web): name user management controls and link visible labels
matteius Oct 31, 2026
ce90735
Require precise regression evidence for older advisory boundaries
matteius Oct 31, 2026
9733af3
test: compare empty preserved files without zero-length memory checks
matteius Oct 31, 2026
6ae02b6
Record control naming completion and advisory validation scheduling
matteius Oct 31, 2026
87fd1c5
Track repeated dialog label scope and full quality-tool checks
matteius Oct 31, 2026
6c096f3
test(storage): retain stale journal files after ownership changes
matteius Oct 31, 2026
8947472
fix(web): associate modal labels and unique dialog headings
matteius Oct 31, 2026
a02a3ca
test(web): record complete unit suite after modal label fixes
matteius Oct 31, 2026
922bb28
fix(storage): journal narrow stale cleanup with durable identity guards
matteius Oct 31, 2026
5b94556
Record repeated label identity and complete web suite verification
matteius Oct 31, 2026
32e7adb
docs(quality): record durable guards and remaining target attribution…
matteius Oct 31, 2026
60bc1b6
Fix AAC bitrate multiplication width with boundary regressions
matteius Oct 31, 2026
0976677
test(storage): cover attributed stale cleanup and delayed identity ch…
matteius Oct 31, 2026
0ba6470
Verify migration boundaries and record guarded target recovery scope
matteius Oct 31, 2026
68414ee
Separate independent soak tooling from deferred device qualification
matteius Oct 31, 2026
cef412d
fix(storage): verify attributed filesystem identity during stale cleanup
matteius Oct 31, 2026
ff302d6
Track AAC arithmetic closure and keep new regressions in CI
matteius Oct 31, 2026
2527830
docs(quality): close lifecycle qualification with real thirteen-check…
matteius Oct 31, 2026
e02c762
Close verified shutdown restart and upgrade continuity tasks
matteius Oct 31, 2026
e7bb4eb
test(quality): specify fail-closed soak and process sampling contracts
matteius Oct 31, 2026
ff7cc35
Add advisory buffer boundary regressions and record remaining failures
matteius Oct 31, 2026
8753d4f
Fence three reproduced buffer defects behind bounded fixes
matteius Oct 31, 2026
8278e9f
Run stale cleanup and durable migration guard regressions in CI
matteius Oct 31, 2026
71dbd4c
fix(web): preserve native user-dialog actions at backdrop boundaries
matteius Oct 31, 2026
17b6536
Reject truncated query column lists instead of returning partial SQL
matteius Oct 31, 2026
27e2960
feat(quality): compose bounded host soak with fail-closed qualification
matteius Oct 31, 2026
5239b96
Validate zone polygon counts before database mutation
matteius Oct 31, 2026
f5dd238
test(quality): expose soak lifetime and ancestry qualification gaps
matteius Oct 31, 2026
614f99e
Record modal boundary closure and bounded buffer progress
matteius Oct 31, 2026
99f155c
fix(quality): preserve soak lifetime boundaries and verify full ancestry
matteius Oct 31, 2026
e9f4e63
Reject incomplete go2rtc multi-source requests and check sizing
matteius Oct 31, 2026
515c90e
fix(quality): separate verification helpers from synthetic sources
matteius Oct 31, 2026
04bca5d
docs(quality): record six passing host cases with unqualified soak re…
matteius Oct 31, 2026
29fa0d5
fix(web): separate native media actions from structural click boundaries
matteius Oct 31, 2026
e26ab1f
Record buffer and host soak results; fence descriptor fix and registe…
matteius Oct 31, 2026
8e082fd
Record verified media and location keyboard actions
matteius Oct 31, 2026
49b8428
test(security): characterize destination credential persistence and a…
matteius Oct 31, 2026
741beec
Verify filesystem advisory successors and reproduce descriptor skip d…
matteius Oct 31, 2026
e3ec7ea
Initialize chmod descriptor output before early returns
matteius Oct 31, 2026
1841b1d
Verify settings shell boundaries and close current advisory regressio…
matteius Oct 31, 2026
6f84a22
docs(security): preserve destination at-rest findings and verify acce…
matteius Oct 31, 2026
0ced859
Require complete fixture cleanup and register advisory regressions in CI
matteius Oct 31, 2026
afed9ef
test(security): clean private credential fixtures and record unresolv…
matteius Oct 31, 2026
d73a48e
Fence unresolved destination credential storage behind a concrete con…
matteius Oct 31, 2026
2fde3e5
docs(security): specify acyclic credential contract follow-up depende…
matteius Oct 31, 2026
bdbea08
Match retained descriptor regression to the original clang finding
matteius Oct 31, 2026
4681262
test(router): verify existing TZif allocation bounds
matteius Oct 31, 2026
3fe96ef
Preserve TZif boundary tests in CI while keeping findings review pending
matteius Oct 31, 2026
d5aa924
fix(web): name timeline and user controls accessibly
matteius Oct 31, 2026
72fde34
Record accessible control names and isolate authorization storage fix…
matteius Oct 31, 2026
d9f30f1
fix(authz): guard cache growth arithmetic before allocation
matteius Oct 31, 2026
230c676
test(authz): provide available storage root for deletion controls
matteius Oct 31, 2026
1b3af74
Record authorization guard verification and keep scanner disposition …
matteius Oct 31, 2026
0f11ff1
test(logger): verify bounded JSON log reads and formatting
matteius Oct 31, 2026
e0e5c9e
docs(quality): propose destination credential storage contract
matteius Oct 31, 2026
efeca7c
fix(web): name plan and recording controls accessibly
matteius Oct 31, 2026
cc3a6c7
docs(quality): clarify credential startup backup ordering
matteius Oct 31, 2026
153099d
test(database): reproduce stale backup cleanup replacement races
matteius Oct 31, 2026
b6500e2
docs(quality): trace pinned FAAC pointer scaling finding
matteius Oct 31, 2026
85a130d
Record verified controls and scope remaining codec and backup identit…
matteius Oct 31, 2026
5c45794
Track codec and backup follow-ups and preserve logger boundary controls
matteius Oct 31, 2026
b82307d
test(faac): verify pinned sample layout and input boundaries
matteius Oct 31, 2026
ccc3229
Record codec boundary verification without overstating pointer safety
matteius Oct 31, 2026
d855236
fix(web): make stream and media actions keyboard accessible
matteius Oct 31, 2026
3c370a4
docs(quality): propose tracked FAAC pointer correction and scan prove…
matteius Oct 31, 2026
54d2f7c
fix(database): quarantine stale backup artifacts before identity-chec…
matteius Oct 31, 2026
6e552b6
Record media accessibility and scope reproducible codec correction wi…
matteius Oct 31, 2026
2e5562e
Record backup artifact identity fix and fence independent pruning review
matteius Oct 31, 2026
0080a39
fix(web): make shared UI actions keyboard accessible
matteius Oct 31, 2026
9d84590
fix(faac): verify tracked input-pointer patch in build-local source
matteius Oct 31, 2026
dc57104
test(storage): reproduce migration publication and cleanup ownership …
matteius Oct 31, 2026
877f9e5
Reproduce published backup retention races and scope migration fixes
matteius Oct 31, 2026
0f66060
Record shared UI and codec fixes and scope published backup retention…
matteius Oct 31, 2026
937d483
ci(quality): require compiled FAAC patch provenance and scan coverage
matteius Oct 31, 2026
1e29089
Run verified backup cleanup regressions in native CI
matteius Oct 31, 2026
39b26e5
Record scanner provenance integration and complete quality validation
matteius Oct 31, 2026
87b812a
fix(storage): publish migrations without replacing competing destinat…
matteius Oct 31, 2026
15ecee9
Record actual scoped codec analyzer reports and migration publication…
matteius Oct 31, 2026
836ac0a
fix(web): name event and fleet form controls
matteius Oct 31, 2026
e3321d5
fix(storage): retain abandoned destinations without ownership proof
matteius Oct 31, 2026
442e97b
Record event and fleet accessibility fixes and migration cleanup owne…
matteius Oct 31, 2026
92de39f
Order later storage writers after identity corrections
matteius Oct 31, 2026
1f92790
Scope preexisting migration temporary-file ownership before publicati…
matteius Oct 31, 2026
787c33e
test(storage): reproduce preexisting migration temporary data loss
matteius Oct 31, 2026
e29ab09
fix(web): name organization and investigation controls
matteius Oct 31, 2026
d829c05
fix(storage): preserve unowned migration temporary artifacts
matteius Oct 31, 2026
1b31cba
Record investigation accessibility and temporary migration ownership …
matteius Oct 31, 2026
eeeb1c5
fix(storage): bind verified migration identity before metadata commit
matteius Oct 31, 2026
8fc6f98
Verify bounded process-name reads and record completed migration race…
matteius Oct 31, 2026
0f5df37
Run migration identity and process-name boundary regressions in CI
matteius Oct 31, 2026
2a2e603
fix(web): name auth download and live media controls
matteius Oct 31, 2026
76f7429
Record accessible auth download and live media controls
matteius Oct 31, 2026
43339ef
fix(database): retain pinned backup identities through pruning
matteius Oct 31, 2026
183bdaf
test(storage): reproduce floor-plan backup and rollback races
matteius Oct 31, 2026
b7d2058
Record retention identity fix and scope floor-plan replacement correc…
matteius Oct 31, 2026
c19a7eb
test(telemetry): characterize hardware text and hash boundaries
matteius Oct 31, 2026
4551efe
Run published backup retention identity regressions in CI
matteius Oct 31, 2026
4a9fe9e
docs(quality): correct current hardware hash warning line
matteius Oct 31, 2026
913e3c6
Record hardware boundary characterization and register its CI coverage
matteius Oct 31, 2026
dc28745
fix(storage): preserve unknown floor-plan backup artifacts
matteius Oct 31, 2026
f8ed107
Scope bounded health-worker partial-start deadlock verification
matteius Oct 31, 2026
01646f5
fix(web): name live login setup and stream controls
matteius Oct 31, 2026
a8ce89a
fix(storage): bind inspected floor-plan background identity
matteius Oct 31, 2026
661cfb6
fix(web): name tag and settings controls
matteius Oct 31, 2026
2192583
Scope bulk-tag stale-prop regression before accessibility acceptance
matteius Oct 31, 2026
b01405e
Record stream accessibility and floor-plan backup identity progress
matteius Oct 31, 2026
44dbb7e
fix(storage): preserve competitors during floor-plan publication and …
matteius Oct 31, 2026
9c35549
fix(recordings): reconcile bulk tags across delayed refreshes
matteius Oct 31, 2026
58ebf81
test(telemetry): verify constructed worker tier bounds
matteius Oct 31, 2026
2bfd773
test(telemetry): reproduce partial worker startup deadlocks
matteius Oct 31, 2026
8772316
Scope lifetime-safe health worker startup correction
matteius Oct 31, 2026
3a60f8d
Record reviewed floor-plan and bulk-tag fixes and tier characterization
matteius Oct 31, 2026
4b6220f
Register floor-plan and worker-tier regressions in native CI
matteius Oct 31, 2026
7df3708
Track separate health shutdown reinitialization ownership hypothesis
matteius Oct 31, 2026
b73a1f4
fix(telemetry): gate workers until startup owns every thread
matteius Oct 31, 2026
095bbe7
Record actual CodeQL codec comparison and startup deadlock closure
matteius Oct 31, 2026
87e5515
Preserve migration boundary producer and actual failing evidence
matteius Oct 31, 2026
b0375cd
Separate migration parser and tracking identifier corrections
matteius Oct 31, 2026
23e65c8
Respect quoted identifiers and comments in migration statement bounda…
matteius Oct 31, 2026
71b5f7a
Run verified startup failure controls in native CI
matteius Oct 31, 2026
dc3199f
fix(web): name health storage and calendar controls
matteius Oct 31, 2026
9f65a26
Quote configured migration tracking names without truncation
matteius Oct 31, 2026
85a8736
Record reviewed migration and settings accessibility completion
matteius Oct 31, 2026
a5f888a
Register verified migration boundary tests in native CI
matteius Oct 31, 2026
6566b33
Record existing database initialization after migration fixes
matteius Oct 31, 2026
5b68e12
Scope settings test compatibility for label association verification
matteius Oct 31, 2026
90c56fa
Include conditional selector association consumer tests
matteius Oct 31, 2026
269dc48
Scope trigger terminator review before migration acceptance
matteius Oct 31, 2026
0142dd2
Scope independent Zone Editor first-toggle characterization
matteius Oct 31, 2026
88a1756
fix(web): name remaining media and shared controls; retain zone toggl…
matteius Oct 31, 2026
c98876b
Recognize SQLite trigger terminators without counting identifier keyw…
matteius Oct 31, 2026
49175ee
Scope confirmed Zone Editor correction and record trigger boundary cl…
matteius Oct 31, 2026
90c64b1
Scope existing modal hook mock compatibility
matteius Oct 31, 2026
2bef1c4
Scope event fixture compatibility while preserving behavioral assertions
matteius Oct 31, 2026
4be6224
Distinguish latest closure from preserved producer evidence
matteius Oct 31, 2026
18a881a
fix(web): keep form labels associated with their own instance
matteius Oct 31, 2026
be3ba44
test(web): reproduce first Zone Editor checkbox state loss
matteius Oct 31, 2026
ed87e4d
Record repeated-form association closure and pending Zone Editor acce…
matteius Oct 31, 2026
7262eab
test(web): await zone data independently of canvas fixture layout
matteius Oct 31, 2026
881ee46
fix(web): preserve first zone checkbox toggle during selection
matteius Oct 31, 2026
eb4a014
Scope existing field selector compatibility for repeated forms
matteius Oct 31, 2026
d5ed1ba
Record verified Zone Editor closure and preserved first-toggle evidence
matteius Oct 31, 2026
8df5a22
fix(web): isolate repeated editor label associations
matteius Oct 31, 2026
e37e791
Record repeated-editor association completion for draft review
matteius Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
122 changes: 82 additions & 40 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,116 @@
name: CodeQL

on:
push:
branches: [main]
workflow_call:
schedule:
# Run weekly on Mondays at 06:00 UTC to catch new CVE patterns
- cron: '0 6 * * 1'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
actions: read
contents: read
security-events: write

jobs:
analyze:
name: CodeQL Analysis
name: CodeQL (${{ matrix.language }})
runs-on: ubuntu-latest
container: debian:sid-slim
timeout-minutes: 45

timeout-minutes: 60
strategy:
fail-fast: false
matrix:
language: ['c-cpp']

include:
- language: c-cpp
scanner: codeql-cpp
build-mode: manual
suite: codeql/cpp-queries:codeql-suites/cpp-security-extended.qls
- language: javascript-typescript
scanner: codeql-javascript-typescript
build-mode: none
suite: codeql/javascript-queries:codeql-suites/javascript-security-extended.qls
defaults:
run:
shell: bash
env:
REPORT_DIR: build/analysis/${{ matrix.scanner }}
SCANNER_ID: ${{ matrix.scanner }}
LANGUAGE: ${{ matrix.language }}
QUERY_SUITE: ${{ matrix.suite }}
SPEC_FILE: build/codeql-spec.json
steps:
- name: Install build dependencies
run: |
apt-get update
apt-get install -y \
git build-essential cmake pkg-config \
apt-get install -y git python3 build-essential cmake pkg-config \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavfilter-dev \
libsqlite3-dev libuv1-dev libllhttp-dev libcurl4-openssl-dev \
libcjson-dev libmbedtls-dev libmosquitto-dev

- name: Checkout
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
submodules: false

- name: Checkout FAAC submodule
run: |
# Keep optional go2rtc/LiteRT sources out of these builds.
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git submodule update --init --depth 1 third_party/faac

- name: Initialize CodeQL
id: init
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# Use extended queries for more thorough security analysis
build-mode: ${{ matrix.build-mode }}
db-location: ${{ github.workspace }}/build/eng-codeql
queries: security-extended

- name: Build for CodeQL
- name: Build explicit native analysis profile
if: matrix.language == 'c-cpp'
run: |
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_SOD=OFF \
-DENABLE_GO2RTC=OFF \
-DBUILD_TESTS=OFF
make -j$(nproc)

- name: Perform CodeQL Analysis
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git submodule update --init --depth 1 third_party/faac
cmake -S . -B build/codeql-native -DCMAKE_BUILD_TYPE=Release \
-DENABLE_SOD=OFF -DENABLE_GO2RTC=OFF -DENABLE_LITERT=OFF \
-DENABLE_SENTRY=OFF -DENABLE_SSL=OFF -DENABLE_MQTT=ON -DBUILD_TESTS=OFF
cmake --build build/codeql-native --parallel 2
- name: Finalize extracted databases without running queries
id: finalize
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"

skip-queries: true
upload: never
- name: Generate CodeQL scanner specification
env:
CODEQL_BIN: ${{ steps.init.outputs.codeql-path }}
CODEQL_DATABASES: ${{ steps.finalize.outputs.db-locations }}
run: |
python3 - <<'PY'
import json, os
from pathlib import Path
databases = json.loads(os.environ['CODEQL_DATABASES'])
if len(databases) != 1: raise ValueError('Expected exactly one extracted language database')
database = Path(next(iter(databases.values()))).resolve()
archive = (database / 'src.zip').relative_to(Path.cwd()).as_posix()
report = os.environ['SCANNER_ID'] + '.sarif'
spec = {'scanner_id':os.environ['SCANNER_ID'], 'version_command':[os.environ['CODEQL_BIN'],'version'],
'commands':[{'argv':[os.environ['CODEQL_BIN'],'database','analyze',str(database),os.environ['QUERY_SUITE'],
'--download','--format=sarif-latest','--output=' + str(Path.cwd() / os.environ['REPORT_DIR'] / report),
'--sarif-category=/language:' + os.environ['LANGUAGE'],'--sarif-add-baseline-file-info'],
'reports':[report], 'timeout_seconds':2700}],
'scope':{'kind':'codeql-source-archive','archive':archive}}
if os.environ['LANGUAGE'] == 'c-cpp':
spec['faac'] = {
'provenance':'build/codeql-native/_deps/lightnvr-faac/provenance.json',
'compile_commands':'build/codeql-native/compile_commands.json'}
Path(os.environ['SPEC_FILE']).parent.mkdir(parents=True,exist_ok=True)
Path(os.environ['SPEC_FILE']).write_text(json.dumps(spec))
PY
- name: Run CodeQL queries with actual exit and archive provenance
run: python3 scripts/quality/scanner_run.py --spec "$SPEC_FILE" --reports "$REPORT_DIR" --expected-revision "$GITHUB_SHA"
- name: Check scoped CodeQL findings
if: always()
run: python3 scripts/quality/findings_lane.py --scanner "$SCANNER_ID" --reports "$REPORT_DIR" --expected-revision "$GITHUB_SHA" --json-out "$REPORT_DIR/lane-result.json"
- name: Upload available SARIF to code scanning
if: always() && hashFiles(format('{0}/*.sarif', env.REPORT_DIR)) != ''
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ${{ env.REPORT_DIR }}/${{ matrix.scanner }}.sarif
category: /language:${{ matrix.language }}
- uses: actions/upload-artifact@v7
if: always()
with:
name: analysis-${{ matrix.scanner }}
path: ${{ env.REPORT_DIR }}
if-no-files-found: error
retention-days: 30
84 changes: 37 additions & 47 deletions .github/workflows/container-scan.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
name: Container Security Scan

on:
workflow_call:
push:
branches: [main]
tags:
- '*.*.*'
tags: ['*.*.*']
workflow_dispatch:

permissions:
contents: read
security-events: write

jobs:
trivy:
name: Trivy Container Scan
runs-on: ubuntu-latest
timeout-minutes: 30

timeout-minutes: 45
env:
REPORT_DIR: build/analysis/trivy
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Build Docker image for scanning
- uses: docker/setup-buildx-action@v4
- name: Build local image for analysis
uses: docker/build-push-action@v7
with:
context: .
Expand All @@ -36,46 +29,43 @@ jobs:
tags: lightnvr:scan
build-args: |
GIT_COMMIT=${{ github.sha }}

- name: Install Trivy
- name: Install Trivy and fetch vulnerability database
run: |
sudo apt-get update
sudo apt-get install -y wget apt-transport-https gnupg
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb generic main" | sudo tee /etc/apt/sources.list.d/trivy.list
echo 'deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb generic main' | sudo tee /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install -y trivy

- name: Run Trivy vulnerability scanner (SARIF)
id: trivy-sarif
trivy image --download-db-only
- name: Capture Trivy report, image identity and database metadata
run: |
trivy image \
--format sarif \
--output trivy-results.sarif \
--severity CRITICAL,HIGH,MEDIUM \
--exit-code 0 \
lightnvr:scan

- name: Upload Trivy SARIF to GitHub Security tab
python3 - <<'PY'
import json, os
from pathlib import Path
spec = {'scanner_id':'trivy-container', 'version_command':['trivy','version','--format','json'], 'version_format':'trivy-json',
'commands':[{'argv':['trivy','image','--scanners','vuln','--format','sarif',
'--output',str(Path.cwd() / os.environ['REPORT_DIR'] / 'trivy-results.sarif'),
'--skip-db-update','--severity','CRITICAL,HIGH,MEDIUM','--exit-code','2','lightnvr:scan'],
'reports':['trivy-results.sarif'],'accepted_exit_codes':[0,2],'timeout_seconds':1800}],
'scope':{'kind':'image','report':'trivy-results.sarif'}}
Path('build').mkdir(exist_ok=True)
Path('build/trivy-spec.json').write_text(json.dumps(spec))
PY
python3 scripts/quality/scanner_run.py --spec build/trivy-spec.json --reports "$REPORT_DIR" --expected-revision "$GITHUB_SHA"
- name: Check scoped container findings
if: always()
run: python3 scripts/quality/findings_lane.py --scanner trivy-container --reports "$REPORT_DIR" --expected-revision "$GITHUB_SHA" --json-out "$REPORT_DIR/lane-result.json"
- name: Upload available SARIF to code scanning
uses: github/codeql-action/upload-sarif@v4
if: always() && steps.trivy-sarif.outcome == 'success'
if: always() && hashFiles(format('{0}/trivy-results.sarif', env.REPORT_DIR)) != ''
with:
sarif_file: 'trivy-results.sarif'
category: 'container-scanning'

- name: Run Trivy (table output for logs)
if: always() && steps.trivy-sarif.outcome == 'success'
run: |
trivy image \
--format table \
--severity CRITICAL,HIGH \
--exit-code 0 \
lightnvr:scan

- name: Upload Trivy report
uses: actions/upload-artifact@v7
if: always() && steps.trivy-sarif.outcome == 'success'
sarif_file: ${{ env.REPORT_DIR }}/trivy-results.sarif
category: container-scanning
- uses: actions/upload-artifact@v7
if: always()
with:
name: trivy-scan-results
path: trivy-results.sarif
name: analysis-trivy
path: ${{ env.REPORT_DIR }}
if-no-files-found: error
retention-days: 30
Loading
Loading