Skip to content

Gate downloads with a last-minute security scan#172

Merged
catherineluse merged 1 commit into
mainfrom
codex/pre-download-scan
Jul 19, 2026
Merged

Gate downloads with a last-minute security scan#172
catherineluse merged 1 commit into
mainfrom
codex/pre-download-scan

Conversation

@catherineluse

@catherineluse catherineluse commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a prepareDownload mutation that runs the existing downloadableFile.downloaded plugin pipeline before releasing a file
  • fail closed when the security scanner is missing, fails, or blocks an ordinary download
  • preserve creator and authorized moderator access for human review
  • return a five-minute signed GCS read URL only after approval and record download analytics afterward
  • stop exposing stored clean-file URLs through ordinary authenticated detail queries

This reuses the existing security-attachment-scan VirusTotal integration; no scan-plugin or scan-service changes are required.

Validation

  • pnpm run codegen
  • pnpm exec tsc --noEmit --pretty false
  • node --loader ts-node/esm --test customResolvers/mutations/prepareDownload.test.ts customResolvers/fields/downloadableFileUrl.test.ts customResolvers/mutations/trackDownload.test.ts (21 passing)

Frontend

Coordinated frontend PR: gennit-project/multiforum-nuxt#402.

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.05310% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
customResolvers/mutations/prepareDownload.ts 87.50% 25 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@catherineluse
catherineluse marked this pull request as ready for review July 19, 2026 19:56
@catherineluse
catherineluse merged commit c244736 into main Jul 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants