IBM / keyprotect-python-client

A Python client for interacting with the IBM Cloud KeyProtect service.
Apache License 2.0
0 stars 9 forks source link

Detect secret #7

Closed Sidd-kp closed 2 years ago

Sidd-kp commented 2 years ago

As part of “IBM Cloud 3Q2022: FS-IA readiness”, all the IBM/KMS repositories must enable “Detect Secrets” tool detect secrets, also scan and audit the secrets in their repositories before 8/21/2022.

In this PR I’ve enabled “detect-secrets” and also scanned and audited this repository. The results are in file .secrets.baseline.

I request that the team audit the potential secrets discovered in this scan.

Action taken as per PR:

For further info on detect-secrets please visit: https://w3.ibm.com/w3publisher/detect-secrets/developer-tool

FYI : Henry Grantham, Dinesh Venkatraman Thanks

dinesh-venkatraman-g commented 2 years ago

The integration test cases are verified locally because the api key is missing in the CI/CD job. All the integration tests are passing in local and the evidences are attached below. So, merging this PR.

gvdinesh@Dineshs-MacBook-Pro keyprotect-python-client % python3 test/integration.py      
12355e2f-4f88-423d-9b80-efecfe3609ce    Another generated key
21490b9a-52e9-4882-a80f-e64e80c98ed0    Key1
2eef7560-c41d-49fb-a103-28a3a1012b46    Key-demo1
3a49bafc-891d-4eeb-bda2-b0120a378fbf    kms_tf_test_key1
af0a87cc-1332-46e8-adf5-440ad9396572    kptest-extractable
b1260344-f91d-4485-9107-15c60c9d4217    Key1
ccea2980-dc09-4399-a6a6-c44d9886db3c    Key-demo11
d4b22c6f-60a7-41ea-b6d7-befa6712b85b    Key-demo
db8f7633-a1eb-4b52-aa05-356391045b72    Key-demo
Created key '43389cc5-b17b-4677-9f2c-cbe193be543d'
{'type': 'application/vnd.ibm.kms.key+json', 'id': '43389cc5-b17b-4677-9f2c-cbe193be543d', 'name': 'MyTestKey', 'state': 1, 'extractable': True, 'crn': 'crn:v1:bluemix:public:kms:us-south:a/3cf97dc472e229147349f281656aa5cc:188d242b-6b5a-4bf2-aaa1-0b3d6cbf5e3b:key:43389cc5-b17b-4677-9f2c-cbe193be543d', 'imported': False, 'keyRingID': 'default', 'creationDate': '2022-09-15T08:39:48Z', 'createdBy': 'IBMid-2700068HGA', 'algorithmType': 'AES', 'algorithmMetadata': {'bitLength': '256', 'mode': 'CBC_PAD'}, 'algorithmBitSize': 256, 'algorithmMode': 'CBC_PAD', 'lastUpdateDate': '2022-09-15T08:39:48Z', 'dualAuthDelete': {'enabled': False}, 'deleted': False, 'payload': 'qXx3khBpa+uo+PZamrzOUWTLK5MugrQTfVYh9HPP2w4='}
Deleted key '43389cc5-b17b-4677-9f2c-cbe193be543d'
Creating root key
Wrapping message: b'This is a really important message.'
Unwrapping message...
Unwrapped plaintext: b'This is a really important message.'
Deleted key 'b32c1309-6cbf-4323-85a0-545bf8f89f5c'
Creating root key
Wrapping message: b'This is a really important message too.'
Unwrapping message...
Unwrapped plaintext: b'This is a really important message too.'
Deleted key '158b9128-df18-474a-9a58-a822f8bce8b5'

gvdinesh@Dineshs-MacBook-Pro keyprotect-python-client % git log
commit b830d5713f83b9b9801101d7e624b778c6865029 (HEAD -> pr_7)
Author: Siddharth Mishra <siddharth.mishra2@ibm.com>
Date:   Thu Aug 18 16:56:00 2022 +0530

    Update .secrets.baseline

    Signed-off-by: Siddharth Mishra <siddharth.mishra2@ibm.com>

commit db5ab6f198ff89f133881462a4d65fa83b406090
Author: Bharath Sakthivel <bharath.sakthivel@ibm.com>
Date:   Fri Aug 12 12:50:39 2022 +0530

    Signed-off-by: Bharath Sakthivel <bharath.sakthivel@ibm.com>

    ran detect-secrets

    Signed-off-by: Siddharth Mishra <siddharth.mishra2@ibm.com>

commit 70372c8ceb08fb96764abb90d1c4c80686916677 (origin/master, origin/HEAD, master)
Author: Mathew Odden <1471252+mrodden@users.noreply.github.com>
Date:   Wed Jun 29 17:54:23 2022 -0500

    Update README.md

commit 17f23556a5b8a9989d43f00aa1b5282a0d6bdd5e (tag: 2.2.0)
Author: Matt Odden <mathewrodden@gmail.com>
Date:   Tue Nov 9 23:02:11 2021 +0000

    Bump versions