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:
parent
b8f1f649db
commit
936d78a18d
@ -123,5 +123,7 @@
|
||||
// Azure resource manager
|
||||
* ARM templates
|
||||
* Bicep
|
||||
// PL/SQL
|
||||
* DBMS_CRYPTO
|
||||
// Go
|
||||
* Go Standard Library
|
||||
|
28
rules/S5547/plsql/how-to-fix-it/dbms-crypto.adoc
Normal file
28
rules/S5547/plsql/how-to-fix-it/dbms-crypto.adoc
Normal 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[]
|
||||
|
3
rules/S5547/plsql/metadata.json
Normal file
3
rules/S5547/plsql/metadata.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
36
rules/S5547/plsql/rule.adoc
Normal file
36
rules/S5547/plsql/rule.adoc
Normal 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[]
|
||||
|
Loading…
x
Reference in New Issue
Block a user