Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Removed

- A bullet item for the Removed category.

-->
<!--
### Added

- A bullet item for the Added category.

-->
<!--
### Changed

- A bullet item for the Changed category.

-->
<!--
### Deprecated

- A bullet item for the Deprecated category.

-->

### Fixed

- Added missing tags PUBLIC, VAULTED, REVOCABLE_BY_GG

<!--
### Security

- A bullet item for the Security category.

-->
5 changes: 4 additions & 1 deletion pygitguardian/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,12 +911,15 @@ class Detector(Base, FromDictMixin):
"CHECK_RUN_SKIP_LOW_RISK",
"CHECK_RUN_SKIP_TEST_CRED",
"IGNORED_IN_CHECK_RUN",
"FALSE_POSITIVE",
"PUBLIC",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried removing Tag entirely and replacing it with str instead? This would be more future-proof and I don't think it would break anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tried it out, seems to work on py-gg

"PUBLICLY_EXPOSED",
"PUBLICLY_LEAKED",
"REGRESSION",
"SENSITIVE_FILE",
"TEST_FILE",
"FALSE_POSITIVE",
"VAULTED",
"REVOCABLE_BY_GG",
]
IgnoreReason = Literal["test_credential", "false_positive", "low_risk"]
OccurrenceKind = Literal["realtime", "historical"]
Expand Down
8 changes: 7 additions & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,13 @@ def test_document_handle_surrogates(self):
"validity": "valid",
"resolved_at": None,
"share_url": "https://dashboard.gitguardian.com/share/incidents/11111111-11111",
"tags": ["FROM_HISTORICAL_SCAN", "SENSITIVE_FILE"],
"tags": [
"FROM_HISTORICAL_SCAN",
"SENSITIVE_FILE",
"REVOCABLE_BY_GG",
"PUBLIC",
"VAULTED",
],
"feedback_list": [
{
"created_at": "2021-05-20T12:40:55.662949Z",
Expand Down
Loading