Skip to content

Feature/new risk indicator #315

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 3 commits into from
Aug 19, 2021
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ how a consumer would use the library (e.g. adding unit tests, updating documenta

- A TOTP token is now required on `code42 profile` commands that check for password validity when a user has MFA enabled.

- Updated minimum version of py42 to `1.18.0` to provide access to `FIRST_DESTINATION_USE` and `RARE_DESTINATION_USE` search filters.

### Fixed

- `code42 profile delete` command now prints a clear error message when deletion target doesn't exist.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"keyrings.alt==3.2.0",
"ipython>=7.16.1",
"pandas>=1.1.3",
"py42>=1.17.0",
"py42>=1.18.0",
],
extras_require={
"dev": [
Expand Down
4 changes: 3 additions & 1 deletion src/code42cli/cmds/securitydata.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"PROTONMAIL": RiskIndicator.EmailServiceUploads.PROTONMAIL,
"QQMAIL": RiskIndicator.EmailServiceUploads.QQMAIL,
"SINA_MAIL": RiskIndicator.EmailServiceUploads.SINA_MAIL,
"SOHU_MAIl": RiskIndicator.EmailServiceUploads.SOHU_MAIl,
"SOHU_MAIL": RiskIndicator.EmailServiceUploads.SOHU_MAIL,
"YAHOO": RiskIndicator.EmailServiceUploads.YAHOO,
"ZOHO_MAIL": RiskIndicator.EmailServiceUploads.ZOHO_MAIL,
"AIRDROP": RiskIndicator.ExternalDevices.AIRDROP,
Expand Down Expand Up @@ -207,6 +207,8 @@
"FILE_MISMATCH": RiskIndicator.UserBehavior.FILE_MISMATCH,
"OFF_HOURS": RiskIndicator.UserBehavior.OFF_HOURS,
"REMOTE": RiskIndicator.UserBehavior.REMOTE,
"FIRST_DESTINATION_USE": RiskIndicator.UserBehavior.FIRST_DESTINATION_USE,
"RARE_DESTINATION_USE": RiskIndicator.UserBehavior.RARE_DESTINATION_USE,
}
risk_indicator_map_reversed = {v: k for k, v in risk_indicator_map.items()}

Expand Down
4 changes: 3 additions & 1 deletion tests/cmds/test_securitydata.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def test_search_and_send_to_when_given_risk_indicator_uses_risk_indicator_filter
("PROTONMAIL", RiskIndicator.EmailServiceUploads.PROTONMAIL),
("QQMAIL", RiskIndicator.EmailServiceUploads.QQMAIL),
("SINA_MAIL", RiskIndicator.EmailServiceUploads.SINA_MAIL),
("SOHU_MAIl", RiskIndicator.EmailServiceUploads.SOHU_MAIl),
("SOHU_MAIL", RiskIndicator.EmailServiceUploads.SOHU_MAIL),
("YAHOO", RiskIndicator.EmailServiceUploads.YAHOO),
("ZOHO_MAIL", RiskIndicator.EmailServiceUploads.ZOHO_MAIL),
("AIRDROP", RiskIndicator.ExternalDevices.AIRDROP),
Expand Down Expand Up @@ -887,6 +887,8 @@ def test_search_and_send_to_when_given_risk_indicator_uses_risk_indicator_filter
("FILE_MISMATCH", RiskIndicator.UserBehavior.FILE_MISMATCH),
("OFF_HOURS", RiskIndicator.UserBehavior.OFF_HOURS),
("REMOTE", RiskIndicator.UserBehavior.REMOTE),
("FIRST_DESTINATION_USE", RiskIndicator.UserBehavior.FIRST_DESTINATION_USE),
("RARE_DESTINATION_USE", RiskIndicator.UserBehavior.RARE_DESTINATION_USE),
],
)
def test_all_caps_risk_indicator_choices_convert_to_risk_indicator_string(
Expand Down