Skip to content

chore(audit): verify release candidate evidence and gate compliance - #1

Merged
lhcaps merged 11 commits into
mainfrom
chore/career-evidence-2026
Nov 1, 2026
Merged

lhcaps merged 11 commits into
mainfrom
chore/career-evidence-2026

Conversation

@lhcaps

@lhcaps lhcaps commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Release candidate verification for Parkly parking platform.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T21:26:34.524707Z e6400ea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6400eaef1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +219 to +223
if (!claim.claimed) {
if (claim.row.status === 'SUCCEEDED' && claim.row.response_json) {
const rid = (req as Request & { id?: string }).id ?? ''
res.json(ok(rid, claim.row.response_json))
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Authenticate before replaying device-upload idempotency keys

The successful-replay branch returns response_json before verifying the device signature, so anyone who knows a site's device code and a previously successful idempotency key can retrieve the cached response without valid HMAC credentials; in MinIO mode that response includes a presigned media URL. The earlier claim also lets invalid requests create FAILED rows before authentication. Verify the signature before claiming or replaying, and compare the stored request hash before returning a cached response.

Useful? React with 👍 / 👎.

'/media/device-upload',
upload.single('file'),
async (req: Request, res: Response, next: NextFunction) => {
const headers = DeviceMediaUploadHeaderSchema.parse({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Catch validation errors in the Express 4 handler

A request missing any required device header throws during this schema parse, before the handler's try block. This API uses Express 4, which does not forward rejected async-handler promises to error middleware; the server's unhandled-rejection listener only logs them, leaving the request without a response. Move the parsing and other early operations inside the try block so failures reach next(err).

Useful? React with 👍 / 👎.

Comment on lines +268 to +272
const stored = await storeUploadedMedia({
buffer: file.buffer,
mimeType: mime,
originalName: file.originalname ?? null,
siteCode: headers['x-site-code'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist device uploads so their URLs can be renewed

When MEDIA_STORAGE_DRIVER=MINIO, storeUploadedMedia returns a presigned viewUrl that expires, but this handler neither creates a gate_read_media record nor returns a mediaId. A later capture that uses this URL stores it as an external URL, which the new /media/:mediaId/view route cannot refresh; after the presigned URL expires, the uploaded evidence is inaccessible through the API. Persist the media metadata and return an ID that can be used to generate a fresh view URL.

Useful? React with 👍 / 👎.

@lhcaps
lhcaps merged commit df1616b into main Nov 1, 2026
3 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.

1 participant