Skip to content

Security update 3: continuous assurance - #45

Merged
alexphillips-dev merged 2 commits into
devfrom
security-update-3-validation
Jul 28, 2026
Merged

Security update 3: continuous assurance#45
alexphillips-dev merged 2 commits into
devfrom
security-update-3-validation

Conversation

@alexphillips-dev

Copy link
Copy Markdown
Owner

Implements replay-resistant mutation authorization, runtime integrity and privacy-safe audit verification, dependency review, OpenSSF Scorecard, CodeQL v4, package 2026.07.28.05, documentation, and regression coverage.\n\nThis PR is the protected-branch delivery path because GitHub requires CodeQL results before accepting the commit on dev.

@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: c26996841c

ℹ️ 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 +325 to +329
if ($replayProtection) {
fvplus_security_consume_nonce($state, $nonce, $endpoint, $action, $now);
fvplus_security_consume_transaction($state, $transactionId, $endpoint, $action, $now);
}
fvplus_security_enforce_rate_limit($state, $contract, $now);

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 Record failed authorization decisions in the audit ledger

When a mutation has an invalid/reused nonce, duplicate transaction ID, or exceeds its rate limit, one of these calls throws and execution never reaches the sole fvplus_append_security_audit_event() call below. Consequently, the new security ledger records only successful authorizations and omits the rejected/replayed requests that are most relevant to abuse investigation; append a sanitized failure event before propagating these authorization errors.

Useful? React with 👍 / 👎.

Comment on lines +430 to +433
$events = readJsonObjectFile(fvplus_security_audit_path());
if (!is_array($events)) {
$events = recoverJsonObjectFromLastGood(fvplus_security_audit_path());
}

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 Report an unreadable audit ledger instead of silently restoring it

If tampering or truncation makes security.audit.json invalid JSON, this fallback calls recoverJsonObjectFromLastGood(), which rewrites the primary file from its mirror; verification then reports the restored chain as healthy. Thus malformed-ledger tampering is silently repaired and never appears as a critical audit-integrity finding, unlike a valid-JSON alteration. Preserve/report the parse failure before any durability recovery.

Useful? React with 👍 / 👎.

@alexphillips-dev
alexphillips-dev merged commit 5b35dd8 into dev Jul 28, 2026
19 of 21 checks passed
@alexphillips-dev
alexphillips-dev deleted the security-update-3-validation branch July 28, 2026 18:20
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