Skip to content

feat(credential): add the API token credential type - #382

Draft
Romuald Lemesle (RomuDeuxfois) wants to merge 2 commits into
mainfrom
refactor/ai-target-token-at-execution
Draft

Romuald Lemesle (RomuDeuxfois) wants to merge 2 commits into
mainfrom
refactor/ai-target-token-at-execution

Conversation

@RomuDeuxfois

@RomuDeuxfois Romuald Lemesle (RomuDeuxfois) commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Proposed changes

  • Add the API credential type and the API_TOKEN secret type (ApiTokenSecret.api_token), so an injector can resolve an API token credential like the other credentials.

Testing Instructions

  1. pytest test/credential test/contracts
  2. Used by the ai-redteam injector to resolve the token of an AI target.

Related issues

  • N/A

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

Ships with the matching openaev and injectors pull requests.

🤖 Generated with Claude Code

…ion code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #382      +/-   ##
==========================================
+ Coverage   85.79%   85.82%   +0.02%     
==========================================
  Files          64       64              
  Lines        3217     3223       +6     
==========================================
+ Hits         2760     2766       +6     
  Misses        457      457              
Files with missing lines Coverage Δ
pyoaev/credential/__init__.py 100.00% <ø> (ø)
pyoaev/credential/resolved.py 100.00% <100.00%> (ø)
pyoaev/credential/types.py 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RomuDeuxfois Romuald Lemesle (RomuDeuxfois) changed the title refactor(inject): fetch an AI target token with the inject authorisation code feat(credential): add the API token credential type Nov 16, 2026
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