-
Notifications
You must be signed in to change notification settings - Fork 1
fix(security): remediation bundle — AES-256-GCM, DOMPurify, WebSocket auth, 4 CVEs, SonarCloud #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6624995
f08fe6e
957e149
68b49b8
95c672f
ce4404d
a88864e
5286f72
8f98e92
3e7bf2d
c6790e2
773a8f1
b396cbc
a67ea0b
357606f
09991f1
863ca0b
8439c5e
094f9f7
981b638
05cbbe8
708b123
e94289f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,27 @@ | ||||||||||||||||||||||||||||||||||||||||||
| # Incremental test run: only tests affected by pushed changes. | ||||||||||||||||||||||||||||||||||||||||||
| # Full suite still runs in CI. | ||||||||||||||||||||||||||||||||||||||||||
| pnpm --filter drop test:changed | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # OpenCodeReview gate: compare local branch against remote base. | ||||||||||||||||||||||||||||||||||||||||||
| # Runs only when ocr CLI is installed and remote base is fetchable. | ||||||||||||||||||||||||||||||||||||||||||
| # Detect base from upstream tracking. If upstream matches current branch | ||||||||||||||||||||||||||||||||||||||||||
| # (PR branch self-tracking) or unset, fall back to origin/rebuild. | ||||||||||||||||||||||||||||||||||||||||||
| CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | ||||||||||||||||||||||||||||||||||||||||||
| UPSTREAM="$(git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}' 2>/dev/null || true)" | ||||||||||||||||||||||||||||||||||||||||||
| REMOTE_BASE="${UPSTREAM}" | ||||||||||||||||||||||||||||||||||||||||||
| if [ -z "${REMOTE_BASE}" ] || [ "${REMOTE_BASE#origin/}" = "${CURRENT_BRANCH}" ]; then | ||||||||||||||||||||||||||||||||||||||||||
| REMOTE_BASE="origin/rebuild" | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if command -v ocr >/dev/null 2>&1 && git rev-parse --quiet --verify "${REMOTE_BASE}" >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||||||||||||
| printf '\n:: Running OpenCodeReview against %s (blocking)...\n' "${REMOTE_BASE}" | ||||||||||||||||||||||||||||||||||||||||||
| ocr review --from "${REMOTE_BASE}" --to HEAD --audience agent --exclude 'pnpm-lock.yaml,Cargo.lock' || { | ||||||||||||||||||||||||||||||||||||||||||
| rc=$? | ||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| printf '\n⚠️ OCR found issues (exit %d). Fix before pushing, or use --no-verify to skip.\n' "$rc" | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The temp file created by Suggestion:
Suggested change
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The temp file created by Suggestion:
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| exit "$rc" | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
| elif ! command -v ocr >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||||||||||||
| printf ':: ocr CLI not found — skipping OpenCodeReview gate\n' | ||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||
| printf ':: Remote base %s not found locally — run `git fetch origin` first.\n' "${REMOTE_BASE}" | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
|
BillyOutlast marked this conversation as resolved.
BillyOutlast marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,11 +27,14 @@ | |||||||||||||||||||||||||||||||||
| ## libarchive-dev + pkg-config let libarchive3-sys link libarchive dynamically (glibc). | ||||||||||||||||||||||||||||||||||
| ## protobuf-compiler is kept for parity (torrential's build.rs uses a vendored protoc). | ||||||||||||||||||||||||||||||||||
| # hadolint ignore=DL3008 | ||||||||||||||||||||||||||||||||||
| USER root | ||||||||||||||||||||||||||||||||||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||||||||||||||||||||||||||||||||||
|
Check failure on line 31 in Dockerfile
|
||||||||||||||||||||||||||||||||||
| libarchive-dev \ | ||||||||||||||||||||||||||||||||||
| pkg-config \ | ||||||||||||||||||||||||||||||||||
| protobuf-compiler \ | ||||||||||||||||||||||||||||||||||
| && rm -rf /var/lib/apt/lists/* | ||||||||||||||||||||||||||||||||||
| # hadolint ignore=DL3002 | ||||||||||||||||||||||||||||||||||
| USER nobody | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above — the Suggestion:
Suggested change
|
||||||||||||||||||||||||||||||||||
| WORKDIR /build | ||||||||||||||||||||||||||||||||||
| COPY . . | ||||||||||||||||||||||||||||||||||
| RUN cargo build --locked --release --manifest-path ./torrential/Cargo.toml | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After Suggestion:
Suggested change
|
||||||||||||||||||||||||||||||||||
|
|
@@ -43,8 +46,11 @@ | |||||||||||||||||||||||||||||||||
| ENV NUXT_TELEMETRY_DISABLED=1 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| ## add git so drop can determine its git ref at build | ||||||||||||||||||||||||||||||||||
| USER root | ||||||||||||||||||||||||||||||||||
| RUN apt-get update && apt-get install -y --no-install-recommends git \ | ||||||||||||||||||||||||||||||||||
|
Check failure on line 50 in Dockerfile
|
||||||||||||||||||||||||||||||||||
| && rm -rf /var/lib/apt/lists/* | ||||||||||||||||||||||||||||||||||
| # hadolint ignore=DL3002 | ||||||||||||||||||||||||||||||||||
| USER node | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+52
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Suggestion:
Suggested change
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| ## copy deps and rest of project files | ||||||||||||||||||||||||||||||||||
| COPY . . | ||||||||||||||||||||||||||||||||||
|
|
@@ -71,7 +77,8 @@ | |||||||||||||||||||||||||||||||||
| # fails with EACCES. With it gone, resolution falls through to the `torrential` | ||||||||||||||||||||||||||||||||||
| # binary installed on PATH (/usr/bin/torrential) below. | ||||||||||||||||||||||||||||||||||
| # hadolint ignore=DL3008 | ||||||||||||||||||||||||||||||||||
| USER root | ||||||||||||||||||||||||||||||||||
| RUN rm -rf /app/torrential && \ | ||||||||||||||||||||||||||||||||||
|
Check failure on line 81 in Dockerfile
|
||||||||||||||||||||||||||||||||||
| apt-get update && apt-get install -y --no-install-recommends \ | ||||||||||||||||||||||||||||||||||
| ca-certificates \ | ||||||||||||||||||||||||||||||||||
| libarchive13 \ | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using both
--symbolic-full-nameand--abbrev-reftogether ingit rev-parseis contradictory and the behavior is not well-defined across Git versions.--symbolic-full-namereturns the full ref path (e.g.,refs/remotes/origin/rebuild) while--abbrev-refreturns the short form (e.g.,origin/rebuild). Subsequent string operations like${REMOTE_BASE#origin/}may behave differently depending on which flag wins.Use only
--abbrev-refto reliably getorigin/rebuildformat.Suggestion: