-
Notifications
You must be signed in to change notification settings - Fork 185
fix: ofac logic #1124
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
fix: ofac logic #1124
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis PR bumps the sdk/core package version and revises OFAC validation in SelfBackendVerifier by removing per-entry checks, introducing a cumulative OR across OFAC fields, and using that single value for final validity decisions. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant Verifier as SelfBackendVerifier
participant Output as genericDiscloseOutput
Caller->>Verifier: verify(input, verificationConfig)
Verifier->>Output: Read OFAC booleans (multiple fields)
Note over Verifier,Output: Compute cumulativeOfac = OR(all OFAC fields)
alt verificationConfig.ofac === true
Verifier->>Verifier: isOfacValid = NOT cumulativeOfac
else verificationConfig.ofac is false/undefined
Verifier->>Verifier: isOfacValid = true
end
Verifier-->>Caller: result with isOfacValid and errors (if any)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on October 17
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| ? genericDiscloseOutput.ofac.every((enabled: boolean, index: number) => | ||
| enabled ? genericDiscloseOutput.ofac[index] : true | ||
| ) | ||
| ? cumulativeOfac |
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.
Bug: OFAC Configuration Mismatch Handling Fails
The system no longer correctly handles OFAC configuration mismatches. If OFAC checks are disabled in the configuration but performed in the proof, the system fails to reject the proof and incorrectly reports isOfacValid: true, which poses a security and compliance risk.
Summary by CodeRabbit