Skip to content
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

fix(secret): remove spaces from asymmetric private key #2434

Merged
merged 2 commits into from
Jul 3, 2022

Conversation

DmitriyLewen
Copy link
Contributor

Description

Remove spaces from regex for asymmetric private key

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@DmitriyLewen DmitriyLewen requested a review from knqyf263 as a code owner July 1, 2022 06:31
@DmitriyLewen DmitriyLewen marked this pull request as draft July 1, 2022 06:42
@DmitriyLewen DmitriyLewen marked this pull request as ready for review July 1, 2022 09:47
@DmitriyLewen DmitriyLewen self-assigned this Jul 1, 2022
@knqyf263 knqyf263 merged commit 71980fe into main Jul 3, 2022
@knqyf263 knqyf263 deleted the fix/asymmetric-private-key branch July 3, 2022 07:14
@benglewis
Copy link

This is happening again, now, but with some different examples:

┌─────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability  │ Severity │ Status │ Installed Version │ Fixed Version │                           Title                            │
├─────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
│ stdlib  │ CVE-2024-24788 │ HIGH     │ fixed  │ 1.22.2            │ 1.22.3        │ golang: net: malformed DNS message can cause infinite loop │
│         │                │          │        │                   │               │ https://avd.aquasec.com/nvd/cve-2024-24788                 │
└─────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴────────────────────────────────────────────────────────────┘

.../.pixi/envs/default/lib/python3.12/site-packages/googleapiclient/discovery_cache/documents/appengine.v1.json (secrets)
=============================================================================================================================================
Total: 1 (HIGH: 1, CRITICAL: 0)

HIGH: AsymmetricPrivateKey (private-key)
════════════════════════════════════════
Asymmetric Private Key
────────────────────────────────────────
 .../.pixi/envs/default/lib/python3.12/site-packages/googleapiclient/discovery_cache/documents/appengine.v1.json:2088
────────────────────────────────────────
2086   "properties": {
2087   "privateKey": {
2088 [ "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: -----BEGIN RSA PRIVATE KEY-----*-----END RSA PRIVATE KEY----- @InputOnly",
2089   "type": "string"
────────────────────────────────────────



.../.pixi/envs/default/lib/python3.12/site-packages/googleapiclient/discovery_cache/documents/appengine.v1alpha.json (secrets)
==================================================================================================================================================
Total: 1 (HIGH: 1, CRITICAL: 0)

HIGH: AsymmetricPrivateKey (private-key)
════════════════════════════════════════
Asymmetric Private Key
────────────────────────────────────────
.../.pixi/envs/default/lib/python3.12/site-packages/googleapiclient/discovery_cache/documents/appengine.v1alpha.json:1023 (added by 'COPY .../.pixi /home')
────────────────────────────────────────
1021   "properties": {
1022   "privateKey": {
1023 [ "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: -----BEGIN RSA PRIVATE KEY-----*-----END RSA PRIVATE KEY----- @InputOnly",
1024   "type": "string"
────────────────────────────────────────



.../.pixi/envs/default/lib/python3.12/site-packages/googleapiclient/discovery_cache/documents/appengine.v1beta.json (secrets)
=================================================================================================================================================
Total: 1 (HIGH: 1, CRITICAL: 0)

HIGH: AsymmetricPrivateKey (private-key)
════════════════════════════════════════
Asymmetric Private Key
────────────────────────────────────────
.../.pixi/envs/default/lib/python3.12/site-packages/googleapiclient/discovery_cache/documents/appengine.v1beta.json:2306 (added by 'COPY .../.pixi /home')
────────────────────────────────────────
2304   "properties": {
2305   "privateKey": {
2306 [ "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: -----BEGIN RSA PRIVATE KEY-----*-----END RSA PRIVATE KEY----- @InputOnly",
2307   "type": "string"
────────────────────────────────────────

@DmitriyLewen
Copy link
Contributor Author

Hello @benglewis
Thanks for your report!

Created #6867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asymmetric Private Key secret rule triggers on empty secret
3 participants