Skip to content

Commit

Permalink
Update tests #2
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvacareanu7 committed Jun 20, 2024
1 parent 4e3599f commit 16037e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/codacy-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ rules:
severity: ERROR
languages:
- csharp
pattern: var $PASSWORD = "$VALUE";
pattern: var $PASSWORD = "$VALUE"
regex: "(?i).*(password|motdepasse|heslo|adgangskode|wachtwoord|salasana|passwort|passord|senha|geslo|clave|losenord|clave|parola|secret|pwd).*"
message: Hardcoded passwords are a security risk. They can be easily found by attackers and used to gain unauthorized access to the system.
metadata:
Expand All @@ -18,7 +18,7 @@ rules:
severity: WARNING
languages:
- generic
pattern: var $STRING = '';
pattern: var $STRING = ''
message: Empty strings can lead to unexpected behavior and should be handled carefully.
metadata:
description: Detects empty strings in the code which might cause issues or bugs.
Expand All @@ -29,7 +29,7 @@ rules:
languages:
- generic
pattern: |
var $PASSWORD = $...VALUE;
var $PASSWORD = $...VALUE
options:
generic_ellipsis_max_span: 0
message: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
CREATE OR REPLACE PACKAGE find_passwords AS
-- Declaration of passwords
password1 VARCHAR2(100) := 'Password123!';
password2 VARCHAR2(100) := 'Admin@456';
password2 VARCHAR2(100) = 'Admin@456';
password3 VARCHAR2(100) := 'UserPass789';

-- Procedure to output passwords
Expand All @@ -26,7 +26,7 @@ END find_passwords;
-- Example 2: Using empty strings
CREATE OR REPLACE PACKAGE find_empty_string AS
-- Declaration of empty strings
empty_string1 VARCHAR2(100) := '';
empty_string1 VARCHAR2(100) = '';
empty_string2 VARCHAR2(100);

-- Procedure to output empty strings
Expand Down

0 comments on commit 16037e4

Please sign in to comment.