Авто-ревью #1

Open
opened 2026-11-21 19:52:01 +00:00 by forgejo-actions · 7 comments

Автоматические результаты код-ревью Codex. Сюда постится ревью push и полное ревью репозитория.

Автоматические результаты код-ревью Codex. Сюда постится ревью push и полное ревью репозитория.

Ревью push 10454ddf

Codex review

Verdict: blocking issues

  • P1 .forgejo/workflows/code-review.yml:19 — The pull-request job mounts the runner’s persistent Codex directory read-write. A contributor whose modified workflow is allowed to run can read any Codex credentials stored there and alter configuration used by later trusted jobs. Remove the mount from PR jobs and give the reviewer isolated state with scoped credentials through a trusted workflow.
  • P2 .forgejo/workflows/code-review.yml:27 — The job clones the review tooling’s default branch and immediately executes its scripts in a container with access to persistent Codex state. A change to that branch can execute code with that access without changing the reviewed SHA. Fetch a reviewed, immutable tooling commit and verify the checkout before running it. Pin the checkout action and container image to immutable references as well.
  • P2 .forgejo/workflows/code-review.yml:39 — The blocking check accepts any truthy value for approve. A review result containing {"approve":"false"} exits successfully and passes the gate. Require approve to be exactly the JSON boolean true.

Reviewer: codex:gpt-6.2-sol (2-pass)
Coverage: 1373 chars, 1 parts, 1 files; head 10454ddf7e79a5e7ee4d80b7c44cb4d494c1d46a, base 4bf89a27ea73c19d4ab9d11e8a85f1bf8fbf6e9a
Passes: 2, candidate findings: 3, dropped by critic: 0

## Ревью push `10454ddf` # Codex review **Verdict: blocking issues** - **P1** `.forgejo/workflows/code-review.yml:19` — The pull-request job mounts the runner’s persistent Codex directory read-write. A contributor whose modified workflow is allowed to run can read any Codex credentials stored there and alter configuration used by later trusted jobs. Remove the mount from PR jobs and give the reviewer isolated state with scoped credentials through a trusted workflow. - **P2** `.forgejo/workflows/code-review.yml:27` — The job clones the review tooling’s default branch and immediately executes its scripts in a container with access to persistent Codex state. A change to that branch can execute code with that access without changing the reviewed SHA. Fetch a reviewed, immutable tooling commit and verify the checkout before running it. Pin the checkout action and container image to immutable references as well. - **P2** `.forgejo/workflows/code-review.yml:39` — The blocking check accepts any truthy value for approve. A review result containing {"approve":"false"} exits successfully and passes the gate. Require approve to be exactly the JSON boolean true. Reviewer: `codex:gpt-6.2-sol (2-pass)` Coverage: 1373 chars, 1 parts, 1 files; head `10454ddf7e79a5e7ee4d80b7c44cb4d494c1d46a`, base `4bf89a27ea73c19d4ab9d11e8a85f1bf8fbf6e9a` Passes: 2, candidate findings: 3, dropped by critic: 0

Ревью push 0222a4cc

Codex review

Verdict: blocking issues

  • P1 .forgejo/workflows/code-review.yml:9 — Manual dispatch can target a feature branch. A contributor with repository write access can change the workflow on that branch and dispatch it before merge, giving their job access to the persistent Codex credentials through the mount at line 26. Enforce access to the credentialed runner outside the workflow so only jobs from protected main can use it.

Reviewer: codex:gpt-6.2-sol (2-pass)
Coverage: 2133 chars, 1 parts, 1 files; head 0222a4ccb87fe5a3a071b78f12ab53eb22d173f3, base d73562b9f7dd7ba303ab6f7fafe7801af1caa7b7
Passes: 2, candidate findings: 1, dropped by critic: 0

## Ревью push `0222a4cc` # Codex review **Verdict: blocking issues** - **P1** `.forgejo/workflows/code-review.yml:9` — Manual dispatch can target a feature branch. A contributor with repository write access can change the workflow on that branch and dispatch it before merge, giving their job access to the persistent Codex credentials through the mount at line 26. Enforce access to the credentialed runner outside the workflow so only jobs from protected main can use it. Reviewer: `codex:gpt-6.2-sol (2-pass)` Coverage: 2133 chars, 1 parts, 1 files; head `0222a4ccb87fe5a3a071b78f12ab53eb22d173f3`, base `d73562b9f7dd7ba303ab6f7fafe7801af1caa7b7` Passes: 2, candidate findings: 1, dropped by critic: 0

Ревью push 8c7f6a3f

Codex review

Verdict: approve

Замечаний нет.

Reviewer: codex:gpt-6.2-sol (2-pass)
Coverage: 1062 chars, 1 parts, 1 files; head 8c7f6a3fb34a323d4349017c1afd3e19a4ab4173, base 0222a4ccb87fe5a3a071b78f12ab53eb22d173f3
Passes: 1, candidate findings: 0, dropped by critic: 0

## Ревью push `8c7f6a3f` # Codex review **Verdict: approve** Замечаний нет. Reviewer: `codex:gpt-6.2-sol (2-pass)` Coverage: 1062 chars, 1 parts, 1 files; head `8c7f6a3fb34a323d4349017c1afd3e19a4ab4173`, base `0222a4ccb87fe5a3a071b78f12ab53eb22d173f3` Passes: 1, candidate findings: 0, dropped by critic: 0

Ревью push fef5a6c3

Codex review

Verdict: blocking issues

  • P2 src/admin.rs:332 — A slow upstream holds the global store mutex throughout the HTTP request and response-body read. Provider lists and credential updates can wait up to 15 seconds per queued probe. Read the credential and effective URL under the mutex, then release it before making the request.
  • P1 src/admin.rs:198 — The provider probe button submits an empty provider update, and connection probe buttons have no click handler. Neither control runs a probe. Send both actions to the provider's /probe endpoint, include connectionId for row probes, and display the returned outcome.
  • P2 src/main.rs:53 — The default GigaAM URL uses HTTPS at a private IP address, but the client trusts only bundled public roots. A GigaAM instance with a private CA certificate fails every health probe during TLS validation. Support an operator-configured CA and keep certificate identity verification enabled.
  • P2 src/probe.rs:93 — A successful upstream response is buffered and parsed as JSON without a byte limit. A large response can exhaust the gateway's memory before the timeout expires. Enforce a response-size limit while reading the body, including when Content-Length is absent.
  • P2 src/admin.rs:334 — A probe request with an unknown provider ID and an existing connection ID records an unknown-provider failure on that connection even though its upstream was never contacted. Resolve the connection within the requested provider before probing, and persist discovery only for a validated connection.
  • P2 src/admin.rs:338 — The UI reads the model count from discovery.models, but the handler drops the probe's model list when saving discovery. A successful probe that returns models therefore displays zero after refresh. Save the returned model count or model IDs with discovery and expose them in the provider list.
  • P3 src/admin.rs:213 — Adding a connection uses an unmasked browser prompt for its API key, exposing the credential to anyone viewing or recording the operator's screen. Use a password input and clear it when the form closes.
  • P1 src/store.rs:543 — Importing a backup with no model aliases erases every alias already configured in the destination. The import also overwrites provider credentials and connections on ID collisions. Preserve destination-only records and reject collisions unless replacement is explicitly requested.
  • P2 src/store.rs:181 — Two processes opening the same new data directory can both observe that master.key is missing. The second write can replace the key after the first process has loaded it, leaving credentials saved by the first process permanently undecryptable after restart. Hold an exclusive data-directory lock for the lifetime of the store and create the key with exclusive creation.
  • P2 src/store.rs:190 — If the service can write to a mounted data directory but lacks permission to change its mode, the ignored chmod failure leaves the directory accessible. With umask 022, master.key is then readable by other local users between creation and chmod. For a key protecting an existing store, that exposes its provider credentials. Fail when the directory cannot be secured and create sensitive files with mode 0600 before writing any bytes.
  • P2 src/store.rs:397 — A connection update with a valid replacement key and an invalid base URL disables its model aliases before URL validation returns an error. The request fails, yet the aliases stay disabled in memory and a later successful save can persist that change. Stage mutations, validate and persist the staged state, then publish it in memory.
  • P2 src/store.rs:206 — A successful save can be lost after a power failure because neither the temporary file nor the parent directory is synced. An acknowledged credential rotation can therefore revert on restart. Sync the temporary file before renaming it and sync the parent directory before returning success.
  • P2 src/store.rs:559 — An API key can pass validation and then panic during hint generation when the last four-byte slice starts inside a UTF-8 character. Build the hint from the final four characters using character boundaries.
  • P2 src/store.rs:491 — A backup containing a base64-decodable IV of the wrong length panics in Nonce::from_slice. Reading a stored credential uses the same unchecked conversion. Check that the decoded IV is exactly 12 bytes and return an error through a shared decryption helper.
  • P1 src/store.rs:592 — The metadata guard checks the text after the last scheme separator. A URL with another scheme separator in its path can pass validation with a blocked destination because the guard reads the wrong host. Parse the URL with the HTTP client's URL parser and check its normalized host.
  • P2 src/store.rs:325 — Disabling a provider with an enabled non-legacy connection succeeds, but the returned provider view still reports it enabled and credential lookup for that connection still succeeds. Make the provider-level disable apply consistently to the view and to credential lookup for all its connections.
  • P2 src/store.rs:403 — Changing a connection's base URL without replacing its key preserves the previous endpoint's successful discovery result and model selections. The connection view can report a healthy endpoint and model count before the new endpoint has been checked. Invalidate discovery and endpoint-dependent model state when the effective URL changes.

Reviewer: codex:gpt-6.2-sol (2-pass)
Coverage: 86096 chars, 2 parts, 10 files; head fef5a6c3a50fd8ac84704d2c6c0bada3f22ea687, base 8c7f6a3fb34a323d4349017c1afd3e19a4ab4173
Passes: 2, candidate findings: 17, dropped by critic: 0

## Ревью push `fef5a6c3` # Codex review **Verdict: blocking issues** - **P2** `src/admin.rs:332` — A slow upstream holds the global store mutex throughout the HTTP request and response-body read. Provider lists and credential updates can wait up to 15 seconds per queued probe. Read the credential and effective URL under the mutex, then release it before making the request. - **P1** `src/admin.rs:198` — The provider probe button submits an empty provider update, and connection probe buttons have no click handler. Neither control runs a probe. Send both actions to the provider's `/probe` endpoint, include `connectionId` for row probes, and display the returned outcome. - **P2** `src/main.rs:53` — The default GigaAM URL uses HTTPS at a private IP address, but the client trusts only bundled public roots. A GigaAM instance with a private CA certificate fails every health probe during TLS validation. Support an operator-configured CA and keep certificate identity verification enabled. - **P2** `src/probe.rs:93` — A successful upstream response is buffered and parsed as JSON without a byte limit. A large response can exhaust the gateway's memory before the timeout expires. Enforce a response-size limit while reading the body, including when `Content-Length` is absent. - **P2** `src/admin.rs:334` — A probe request with an unknown provider ID and an existing connection ID records an unknown-provider failure on that connection even though its upstream was never contacted. Resolve the connection within the requested provider before probing, and persist discovery only for a validated connection. - **P2** `src/admin.rs:338` — The UI reads the model count from `discovery.models`, but the handler drops the probe's model list when saving discovery. A successful probe that returns models therefore displays zero after refresh. Save the returned model count or model IDs with discovery and expose them in the provider list. - **P3** `src/admin.rs:213` — Adding a connection uses an unmasked browser prompt for its API key, exposing the credential to anyone viewing or recording the operator's screen. Use a password input and clear it when the form closes. - **P1** `src/store.rs:543` — Importing a backup with no model aliases erases every alias already configured in the destination. The import also overwrites provider credentials and connections on ID collisions. Preserve destination-only records and reject collisions unless replacement is explicitly requested. - **P2** `src/store.rs:181` — Two processes opening the same new data directory can both observe that master.key is missing. The second write can replace the key after the first process has loaded it, leaving credentials saved by the first process permanently undecryptable after restart. Hold an exclusive data-directory lock for the lifetime of the store and create the key with exclusive creation. - **P2** `src/store.rs:190` — If the service can write to a mounted data directory but lacks permission to change its mode, the ignored chmod failure leaves the directory accessible. With umask 022, master.key is then readable by other local users between creation and chmod. For a key protecting an existing store, that exposes its provider credentials. Fail when the directory cannot be secured and create sensitive files with mode 0600 before writing any bytes. - **P2** `src/store.rs:397` — A connection update with a valid replacement key and an invalid base URL disables its model aliases before URL validation returns an error. The request fails, yet the aliases stay disabled in memory and a later successful save can persist that change. Stage mutations, validate and persist the staged state, then publish it in memory. - **P2** `src/store.rs:206` — A successful save can be lost after a power failure because neither the temporary file nor the parent directory is synced. An acknowledged credential rotation can therefore revert on restart. Sync the temporary file before renaming it and sync the parent directory before returning success. - **P2** `src/store.rs:559` — An API key can pass validation and then panic during hint generation when the last four-byte slice starts inside a UTF-8 character. Build the hint from the final four characters using character boundaries. - **P2** `src/store.rs:491` — A backup containing a base64-decodable IV of the wrong length panics in Nonce::from_slice. Reading a stored credential uses the same unchecked conversion. Check that the decoded IV is exactly 12 bytes and return an error through a shared decryption helper. - **P1** `src/store.rs:592` — The metadata guard checks the text after the last scheme separator. A URL with another scheme separator in its path can pass validation with a blocked destination because the guard reads the wrong host. Parse the URL with the HTTP client's URL parser and check its normalized host. - **P2** `src/store.rs:325` — Disabling a provider with an enabled non-legacy connection succeeds, but the returned provider view still reports it enabled and credential lookup for that connection still succeeds. Make the provider-level disable apply consistently to the view and to credential lookup for all its connections. - **P2** `src/store.rs:403` — Changing a connection's base URL without replacing its key preserves the previous endpoint's successful discovery result and model selections. The connection view can report a healthy endpoint and model count before the new endpoint has been checked. Invalidate discovery and endpoint-dependent model state when the effective URL changes. Reviewer: `codex:gpt-6.2-sol (2-pass)` Coverage: 86096 chars, 2 parts, 10 files; head `fef5a6c3a50fd8ac84704d2c6c0bada3f22ea687`, base `8c7f6a3fb34a323d4349017c1afd3e19a4ab4173` Passes: 2, candidate findings: 17, dropped by critic: 0

Ревью push 690c3ac2

Codex review

Verdict: blocking issues

  • P2 src/admin.rs:390 — A probe can start against the old endpoint, then finish after an endpoint change has cleared discovery. The handler writes the old endpoint's status and model list back onto the updated connection. Capture the connection revision before the request and persist the result only if that revision still matches.
  • P2 src/store.rs:610 — A destination provider can be disabled and keep its keys on individual connections. Because its provider record has no secret, importing an enabled provider record with the same ID silently re-enables all those connections without --force. Detect collisions by provider ID, including records without a provider-level secret.
  • P2 src/store.rs:238 — First startup creates master.key before generating or writing its bytes. If key generation fails or the process stops before the write completes, subsequent starts reject the empty or short file and cannot recover. Write and sync the complete key in a mode-0600 temporary file, then publish it atomically under the store lock and sync the directory.
  • P2 src/store.rs:277 — A directory sync failure is discarded, so a credential update or import can report success even though a crash can undo the rename. Opening the directory can also fail after the rename, leaving connection updates on disk while memory retains the previous state. Open the directory before renaming, surface sync failures, and keep memory aligned with the file once the rename succeeds.
  • P2 src/store.rs:213 — Running import against a serving instance blocks indefinitely because the daemon holds the exclusive lock for its lifetime. Use a nonblocking lock, or a bounded wait, and return an actionable error when another process owns the store.
  • P3 src/store.rs:225 — A restored master.key with mode 0644 causes the first startup to fail even when the process successfully changes it to 0600. Check the resulting permissions after the repair and fail only if the key is still accessible to group or other users.

Reviewer: codex:gpt-6.2-sol (2-pass)
Coverage: 38127 chars, 1 parts, 6 files; head 690c3ac27e7b3a744872a6e6fbbbb10caa834ea4, base fef5a6c3a50fd8ac84704d2c6c0bada3f22ea687
Passes: 2, candidate findings: 7, dropped by critic: 1

## Ревью push `690c3ac2` # Codex review **Verdict: blocking issues** - **P2** `src/admin.rs:390` — A probe can start against the old endpoint, then finish after an endpoint change has cleared discovery. The handler writes the old endpoint's status and model list back onto the updated connection. Capture the connection revision before the request and persist the result only if that revision still matches. - **P2** `src/store.rs:610` — A destination provider can be disabled and keep its keys on individual connections. Because its provider record has no secret, importing an enabled provider record with the same ID silently re-enables all those connections without --force. Detect collisions by provider ID, including records without a provider-level secret. - **P2** `src/store.rs:238` — First startup creates master.key before generating or writing its bytes. If key generation fails or the process stops before the write completes, subsequent starts reject the empty or short file and cannot recover. Write and sync the complete key in a mode-0600 temporary file, then publish it atomically under the store lock and sync the directory. - **P2** `src/store.rs:277` — A directory sync failure is discarded, so a credential update or import can report success even though a crash can undo the rename. Opening the directory can also fail after the rename, leaving connection updates on disk while memory retains the previous state. Open the directory before renaming, surface sync failures, and keep memory aligned with the file once the rename succeeds. - **P2** `src/store.rs:213` — Running import against a serving instance blocks indefinitely because the daemon holds the exclusive lock for its lifetime. Use a nonblocking lock, or a bounded wait, and return an actionable error when another process owns the store. - **P3** `src/store.rs:225` — A restored master.key with mode 0644 causes the first startup to fail even when the process successfully changes it to 0600. Check the resulting permissions after the repair and fail only if the key is still accessible to group or other users. Reviewer: `codex:gpt-6.2-sol (2-pass)` Coverage: 38127 chars, 1 parts, 6 files; head `690c3ac27e7b3a744872a6e6fbbbb10caa834ea4`, base `fef5a6c3a50fd8ac84704d2c6c0bada3f22ea687` Passes: 2, candidate findings: 7, dropped by critic: 1

Ревью push 3b482088

Codex review

Verdict: blocking issues

  • P2 src/store.rs:267 — If the process dies after creating master.key.tmp and before renaming it, the next startup still finds no master.key and fails because create_new rejects the leftover temp file. A write or sync failure leaves the same blocker. Remove any stale staging file while holding the store lock, then clean up the new staging file on errors before rename.
  • P2 src/admin.rs:400 — If the upstream probe succeeds but syncing the store directory fails, the handler discards the persistence error and returns the successful probe result. A crash can then lose the discovery update. Surface the set_discovery error in the API response.
  • P3 src/store.rs:232 — If a signal interrupts a blocking flock during server startup, the server reports that another aris-ep instance is running and tells the operator to stop it before importing. Use the contention message only for EWOULDBLOCK in nonblocking mode and report the underlying flock error otherwise.

Reviewer: codex:gpt-6.2-sol (2-pass)
Coverage: 13131 chars, 1 parts, 3 files; head 3b482088466e3451d4263e82481d7cc99eb4f11a, base 690c3ac27e7b3a744872a6e6fbbbb10caa834ea4
Passes: 2, candidate findings: 3, dropped by critic: 0

## Ревью push `3b482088` # Codex review **Verdict: blocking issues** - **P2** `src/store.rs:267` — If the process dies after creating master.key.tmp and before renaming it, the next startup still finds no master.key and fails because create_new rejects the leftover temp file. A write or sync failure leaves the same blocker. Remove any stale staging file while holding the store lock, then clean up the new staging file on errors before rename. - **P2** `src/admin.rs:400` — If the upstream probe succeeds but syncing the store directory fails, the handler discards the persistence error and returns the successful probe result. A crash can then lose the discovery update. Surface the set_discovery error in the API response. - **P3** `src/store.rs:232` — If a signal interrupts a blocking flock during server startup, the server reports that another aris-ep instance is running and tells the operator to stop it before importing. Use the contention message only for EWOULDBLOCK in nonblocking mode and report the underlying flock error otherwise. Reviewer: `codex:gpt-6.2-sol (2-pass)` Coverage: 13131 chars, 1 parts, 3 files; head `3b482088466e3451d4263e82481d7cc99eb4f11a`, base `690c3ac27e7b3a744872a6e6fbbbb10caa834ea4` Passes: 2, candidate findings: 3, dropped by critic: 0

Ревью push 4c53bc81

Codex review

Verdict: approve

Замечаний нет.

Reviewer: codex:gpt-6.2-sol (2-pass)
Coverage: 3363 chars, 1 parts, 2 files; head 4c53bc813e7a659c504732f423b73cf234a85799, base 3b482088466e3451d4263e82481d7cc99eb4f11a
Passes: 2, candidate findings: 1, dropped by critic: 1

## Ревью push `4c53bc81` # Codex review **Verdict: approve** Замечаний нет. Reviewer: `codex:gpt-6.2-sol (2-pass)` Coverage: 3363 chars, 1 parts, 2 files; head `4c53bc813e7a659c504732f423b73cf234a85799`, base `3b482088466e3451d4263e82481d7cc99eb4f11a` Passes: 2, candidate findings: 1, dropped by critic: 1
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aris/aris-ep#1
No description provided.