Skip to content

Commit

Permalink
Add origin name to leak disclosure event (#17558)
Browse files Browse the repository at this point in the history
  • Loading branch information
di authored Feb 4, 2025
1 parent 6792d38 commit 3eb7f92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit/integration/secrets/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ def test_analyze_disclosure(monkeypatch, metrics, someorigin):
"permissions": "user",
"caveats": [],
"description": "foo",
"origin": "SomeOrigin",
},
)
]
Expand Down
1 change: 1 addition & 0 deletions warehouse/integrations/secrets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ def _analyze_disclosure(request, disclosure_record, origin):
),
"caveats": database_macaroon.caveats,
"description": database_macaroon.description,
"origin": origin.name,
},
)
metrics.increment(f"warehouse.token_leak.{origin.metric_name}.processed")
Expand Down

0 comments on commit 3eb7f92

Please sign in to comment.