Skip to content

Commit

Permalink
ci(js): fix snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
gotbadger committed Feb 22, 2024
1 parent c272c2d commit 0da16ed
Showing 1 changed file with 35 additions and 37 deletions.
72 changes: 35 additions & 37 deletions tests/java/lang/weak_encryption_des/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,41 @@

exports[`java_lang_weak_encryption_des des 1`] = `
"{
"critical": [
"high": [
{
"cwe_ids": [
"327"
],
"id": "java_lang_weak_encryption_des",
"title": "Usage of weak encryption algorithm (DES)",
"description": "## Description\\n\\nA weak encryption library can lead to data breaches and greater security risk.\\n\\n## Remediations\\nAccording to [OWASP](https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/09-Testing_for_Weak_Cryptography/04-Testing_for_Weak_Encryption), DES (Data Encryption Standard) is considered a weak encryption algorithm and therefore shouldn't be used.\\n\\n✅ Use stronger encryption algorithms when storing data.\\n\\n\`\`\`java\\n Cipher c = Cipher.getInstance(\\"AES/CBC/PKCS5Padding\\");\\n\`\`\`\\n\\n## Resources\\n- [Java Cipher class](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/javax/crypto/Cipher.html)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/java_lang_weak_encryption_des",
"line_number": 8,
"full_filename": "/tmp/bearer-scan/des.java",
"filename": ".",
"source": {
"start": 8,
"end": 8,
"column": {
"start": 10,
"end": 28
}
},
"sink": {
"start": 8,
"end": 8,
"column": {
"start": 10,
"end": 28
},
"content": "c.doFinal(payload)"
},
"parent_line_number": 8,
"snippet": "c.doFinal(payload)",
"fingerprint": "60af5e5a37dd787a36691cc2e2f2b9e9_0",
"old_fingerprint": "27357c0c82c205919517bc283f383f18_0",
"code_extract": " return c.doFinal(payload);"
},
{
"cwe_ids": [
"327"
Expand Down Expand Up @@ -87,42 +121,6 @@ exports[`java_lang_weak_encryption_des des 1`] = `
"old_fingerprint": "27357c0c82c205919517bc283f383f18_2",
"code_extract": " return c.doFinal(user.lastname);"
}
],
"high": [
{
"cwe_ids": [
"327"
],
"id": "java_lang_weak_encryption_des",
"title": "Usage of weak encryption algorithm (DES)",
"description": "## Description\\n\\nA weak encryption library can lead to data breaches and greater security risk.\\n\\n## Remediations\\nAccording to [OWASP](https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/09-Testing_for_Weak_Cryptography/04-Testing_for_Weak_Encryption), DES (Data Encryption Standard) is considered a weak encryption algorithm and therefore shouldn't be used.\\n\\n✅ Use stronger encryption algorithms when storing data.\\n\\n\`\`\`java\\n Cipher c = Cipher.getInstance(\\"AES/CBC/PKCS5Padding\\");\\n\`\`\`\\n\\n## Resources\\n- [Java Cipher class](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/javax/crypto/Cipher.html)\\n",
"documentation_url": "https://docs.bearer.com/reference/rules/java_lang_weak_encryption_des",
"line_number": 8,
"full_filename": "/tmp/bearer-scan/des.java",
"filename": ".",
"source": {
"start": 8,
"end": 8,
"column": {
"start": 10,
"end": 28
}
},
"sink": {
"start": 8,
"end": 8,
"column": {
"start": 10,
"end": 28
},
"content": "c.doFinal(payload)"
},
"parent_line_number": 8,
"snippet": "c.doFinal(payload)",
"fingerprint": "60af5e5a37dd787a36691cc2e2f2b9e9_0",
"old_fingerprint": "27357c0c82c205919517bc283f383f18_0",
"code_extract": " return c.doFinal(payload);"
}
]
}"
`;

0 comments on commit 0da16ed

Please sign in to comment.