Skip to content

Commit

Permalink
Instruct SonarQube to ignore the security issue for the access keys a…
Browse files Browse the repository at this point in the history
…nd tokens in the docstring and test data
  • Loading branch information
Raj725 committed Sep 17, 2024
1 parent 86300de commit 9c37474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pebblo/entity_classifier/entity_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def presidio_entity_classifier_and_anonymizer(
input_text = " My SSN is 222-85-4836.
ITIN number 993-77 0690
And AWS Access Key is: AKIAQIPT4PDORIRTV6PH."
And AWS Access Key is: AKIAQIPT4PDORIRTV6PH." # NOSONAR
response:
entities = {'aws-access-key': 1, 'us-itin': 1, 'us-ssn': 1}
total_count = 3
Expand Down
4 changes: 2 additions & 2 deletions tests/entity_classifier/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ITIN number 993-77 0690
His AWS Access Key is: AKIAQIPT4PDORIRTV6PH.
And Github Token is: ghp_hgu657yiujgwfrtigu3ver238765tyuhygvtrder6t7gyvhbuy5e676578976tyghy76578uygfyfgcyturtdf
"""
""" # NOSONAR

input_text2 = """
Content
Expand All @@ -26,7 +26,7 @@
Slack Token - xoxb-3204014939555-4519358291237-TTIf0243T8YFSAGEVr1wBrWE
Google API key- KLzaSyB_tWrbmfWx8g2bzL7Vhq7znuTUn0JPKmY"
My IP Address - 10.55.60.61
"""
""" # NOSONAR

negative_data = """
Sachin's SSN is 222-85.
Expand Down

0 comments on commit 9c37474

Please sign in to comment.