Skip to content

feature: add support to 2FA#992

Merged
amine3 merged 7 commits intomainfrom
feature/CIsupport2FA
Mar 19, 2026
Merged

feature: add support to 2FA#992
amine3 merged 7 commits intomainfrom
feature/CIsupport2FA

Conversation

@marouaneabeqqal-ostorlab
Copy link
Copy Markdown
Contributor

This PR extends the oxo ci-scan run command to support new test credential types, allowing users to authenticate into applications protected by 2FA or TOTP during automated CI scans.

Key Changes

  • CLI: Added new optional flags to the ci-scan run command:
    • --email-2fa-sender-email-address
    • --email-2fa-email-address
    • --email-2fa-password
    • --sms-2fa-sender
    • --totp-2fa-seed
  • Asset Handlers: Updated mobile.py and link.py in src/ostorlab/cli/ci_scan/run/assets/ to correctly process these new arguments and construct the corresponding TestCredential objects.
  • API: Added support for new credential data classes (TestCredentialEmail2FA, TestCredentialSMS2FA, TestCredentialTOTP2FA) and updated the GraphQL mutation in src/ostorlab/apis/test_credentials_create.py to support these types.
  • Tests: Added an integration test in tests/cli/ci_scan/run/run_test.py to verify that the CLI correctly parses the new arguments and passes them to the API runner.

@marouaneabeqqal-ostorlab marouaneabeqqal-ostorlab requested a review from a team as a code owner March 19, 2026 11:27
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 74.22680% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.09%. Comparing base (fb5b2d2) to head (743c41e).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/ostorlab/apis/test_credentials_create.py 17.64% 14 Missing ⚠️
src/ostorlab/cli/ci_scan/run/assets/link.py 62.50% 6 Missing ⚠️
src/ostorlab/cli/ci_scan/run/run.py 37.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #992      +/-   ##
==========================================
+ Coverage   66.04%   66.09%   +0.05%     
==========================================
  Files         365      367       +2     
  Lines       15874    15969      +95     
==========================================
+ Hits        10484    10555      +71     
- Misses       5390     5414      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

amine3
amine3 previously approved these changes Mar 19, 2026
@amine3 amine3 merged commit 9059184 into main Mar 19, 2026
13 of 17 checks passed
@amine3 amine3 deleted the feature/CIsupport2FA branch March 19, 2026 14:16
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.

3 participants