Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CodeQL

on:
push:
branches: [main]
paths:
- "app/**"
- "pyproject.toml"
pull_request:
branches: [main]
schedule:
- cron: "0 3 * * 1" # weekly — Monday 03:00 UTC

jobs:
analyze:
name: Analyze (python)
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read

steps:
- uses: actions/checkout@v6

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: python
queries: security-extended

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:python"
6 changes: 5 additions & 1 deletion app/cli/core/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ def inspect_artifact(path: str) -> ArtifactMetadata:
raise FileNotFoundError(f"Artifact not found: {abs_path}")

script = _INSPECT_SCRIPT.format(path=abs_path)
result = subprocess.run(
# shell=False (list form) — not vulnerable to command injection.
# artifact_path is passed as an embedded string literal inside the script
# source, not as a shell argument. Subprocess injection does not apply.
# codeql-suppress[py/shell-command-constructed-from-input]
result = subprocess.run( # noqa: S603
[sys.executable, "-c", script],
capture_output=True,
text=True,
Expand Down