Skip to content
Open
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
20 changes: 20 additions & 0 deletions app/util/secretsTesting.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This is only a test code. I am deliberately inserting an API token to see the behaviour
# of the github secret scanner. This should ideally get flagged immediately.
# The API token's access has been revoked before this commit.
# What if there is a secret in the comments?
# Like this: ATATTx9p0lo0w2dLtRK7B_hegdeg1wTwkiZHpl2YZaqdX4qD3VBF42Syo0oTKC4KRv8Hlxn_T2kh5iLTBq2Yb_a6u5-mbabbykZR9rBGujl-wwwiIDo0jAk97I3THt0V-w8WHATwdMj723QcmDdRt7lCgR91r1w1oOqgUytHRrFDYF2hfwl0FA0=877F61C9
# This is a Jira token now revoked. Will it detect its presence in the comments?
# Lets see.

# Set the BB_API_Token
BB_API_Token = "ATATT78guXF035Pz8ssmhVxLr9tGUFYbruhBKBjol70klYyR-0zWDx40zrl6YVvQ8p1sign0rem3-qRqeFArV3ylStucxPbllyV3lDo8NfXLYRfX1-GvXwSLtvbw0pMAELSd-lF4AAbWQJ07A_CiLhhbhJvdDF9q4sL_qPvCt_CiG72GkwMgQqI=E29B92E9"
BB_Email = "rthiy@atlassian.com"
auth = HTTPBasicAuth(BB_Email, BB_API_Token)
requestUrlBase = "https://api.bitbucket.org/2.0/repositories/"

userCheckBaseUrl = "https://api.bitbucket.org/2.0/users/"

# Adding another token which should be blocked ideally
BB_API_ALT_TOKEn = "ATATT3xFfGF0F4HhU6mZxuDqab7hN9l3W7Jhk3Ldwps3Bdn_pWd9A7j_V-3BFC9W-tEsXbEU_YVg9MSaD_6JeWnhYl1ImlLs-JQE--wI0vypysRYqvUA48DP6P_Y2t1TQcHiOuc-dep1v_YKJ_4SCI8jw3Li4V_K8MqOTWRLv-cHfhHEe3IeM5s=8102408F"

BB_API_ALT_OBSC_Tokn = "ATATT3xFfGF0F4HhU6mZxiDqaF7hN9l3W7Jhk3Ldpsw3Bdn_pWd9A7j_V-3BFC9W-tEsXbEU_YVg9MSaD_6JeWnhYl1ImlLs-JQE--wI0vyvianYqvUA48DP6P_Y2t1TQcHOuch-dep2s_LKG_4SCI8jw3Li4V_K8MqOTWRLv-cHfhHER3IeM7s=8102408F"