Modify S5547(PL/SQL): Migrate to LayC - code re-creation (#3358)

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
This commit is contained in:
Loris S 2023-10-26 10:35:54 +02:00 committed by GitHub
parent b8f1f649db
commit 936d78a18d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 69 additions and 0 deletions

View File

@ -123,5 +123,7 @@
// Azure resource manager
* ARM templates
* Bicep
// PL/SQL
* DBMS_CRYPTO
// Go
* Go Standard Library

View File

@ -0,0 +1,28 @@
== How to fix it in ``++DBMS_CRYPTO++``
=== Code examples
include::../../common/fix/code-rationale.adoc[]
==== Noncompliant code example
[source,sql,diff-id=1,diff-type=noncompliant]
----
PLS_INTEGER := DBMS_CRYPTO.ENCRYPT_DES // Noncompliant
+ DBMS_CRYPTO.CHAIN_CBC
+ DBMS_CRYPTO.PAD_PKCS5;
----
==== Compliant solution
[source,sql,diff-id=1,diff-type=compliant]
----
PLS_INTEGER := DBMS_CRYPTO.ENCRYPT_AES256
+ DBMS_CRYPTO.CHAIN_CBC
+ DBMS_CRYPTO.PAD_PKCS5;
----
=== How does this work?
include::../../common/fix/strong-cryptography.adoc[]

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,36 @@
include::../summary.adoc[]
== Why is this an issue?
include::../rationale.adoc[]
include::../impact.adoc[]
// How to fix it section
include::how-to-fix-it/dbms-crypto.adoc[]
== Resources
=== Documentation
* Oracles docs - https://docs.oracle.com/en/database/oracle/oracle-database/21/arpls/DBMS_CRYPTO.html[DBMS_CRYPTO reference]
include::../common/resources/standards.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]