Skip to content

fix: Add missing scopes to TokenScope enum #142

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

Merged
merged 2 commits into from
Apr 25, 2025

Conversation

salome-voltz
Copy link
Contributor

This fixes a bug in ggshield.

When trying to scan somthing with flag --with-incident-details, ggshield performs a call to /api_tokens/{token}. The response is deserialized using an enum for scopes.

The enum was missing some recently added scope. Thus, ggshield secret scan path FILE --with-incident-details was crashing when called with a token having the new scopes :

image

@salome-voltz salome-voltz requested a review from a team as a code owner April 25, 2025 12:00
@salome-voltz salome-voltz self-assigned this Apr 25, 2025
@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.77%. Comparing base (933318c) to head (60b9f34).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
+ Coverage   95.75%   95.77%   +0.01%     
==========================================
  Files           5        5              
  Lines        1202     1206       +4     
==========================================
+ Hits         1151     1155       +4     
  Misses         51       51              
Flag Coverage Δ
unittests 95.77% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@salome-voltz salome-voltz force-pushed the salomevoltz/add-missing-scopes branch from 6c68494 to de5cd62 Compare April 25, 2025 14:06
@salome-voltz salome-voltz merged commit 6529bb2 into master Apr 25, 2025
19 checks passed
@salome-voltz salome-voltz deleted the salomevoltz/add-missing-scopes branch April 25, 2025 14:58
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.

4 participants