Repository navigation
fix(security): require admin auth for QR code validation bypass flag - #29
Open
failsafesecurity wants to merge 1 commit into
Open
failsafesecurity wants to merge 1 commit into
failsafesecurity wants to merge 1 commit into
Conversation
The -o CLI flag (operator_qr_code_override) bypasses backend QR code validation, allowing operators to submit invalid/manipulated QR codes. Previously, any operator could use -o to skip verification entirely. Fix: gate the bypass behind the 'stage' feature flag (development builds only). In production builds, the bypass is rejected with an error log and metrics increment. In stage builds, a warning is logged when the bypass is active. Severity: Medium Finding ID: cmsdegzmm003sob01zv0pkewz Signed-off-by: Yajat Kapur Failsafe <yajat@getfailsafe.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security Fix: Operator QR Code Validation Bypass via Unguarded CLI Flag (-o)
Severity: Medium
Finding ID:
cmsdegzmm003sob01zv0pkewzProblem
The orb-core operator CLI flag
-o(--operator-qr-code) allows providing a custom operator QR code that completely bypasses backend QR code validation. When this flag is set:verify_operator_qr_code(), whenoperator_qr_code_override.is_some(), backend verification is skipped entirely, returning dummy "DEV" location dataThis means any operator with CLI access can submit invalid or manipulated QR codes through the orb device flow, bypassing the operator identity verification that the backend normally performs.
Code Location
Fix
Gate the
-obypass behind thestagefeature flag (development builds only):SECURITY: Operator QR code validation bypass via CLI -o flag is only permitted in stage builds) and a failure metric incrementSECURITY: Operator QR code validation bypass is active (stage build))signup_extension()path is unchanged (it has its own validation logic)This ensures the bypass can only be used in development/testing environments, not in production where it could be abused.
Testing
-owith any QR code will now fail operator validation instead of bypassing it-owill work as before but with a warning log-o) is unaffectedSubmitted by FailSafe Security Research