Skip to content

Add Swift rules and tests for hard-coded encryption secrets #167

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

Merged

Conversation

ESS-ENN
Copy link
Collaborator

@ESS-ENN ESS-ENN commented Mar 5, 2025

Summary by CodeRabbit

  • New Features
    • Introduced enhanced security checks to identify hard-coded secrets in Swift encryption, covering multiple algorithms such as AES, Blowfish, ChaCha20, and Rabbit.
  • Tests
    • Added comprehensive snapshot tests to validate encryption behavior across various scenarios.
    • Implemented new test configurations to ensure correct handling of valid and invalid inputs, along with an updated integration test for managing empty password cases.

Copy link

coderabbitai bot commented Mar 5, 2025

Walkthrough

This pull request introduces four new security rule configuration files for Swift—targeting AES, Blowfish, ChaCha20, and Rabbit—to detect hard-coded encryption secrets. In addition, snapshot test files and test configuration files have been added for these rules, along with a Ruby-based snapshot for an empty password scenario using mysql2. The rules use multiple pattern matching utilities and constraints to identify hard-coded secrets, advising developers to use environment variables or secure vaults for secret management.

Changes

File(s) Change Summary
rules/swift/security/...-hardcoded-secret-swift.yml Added new security rule configurations for AES, Blowfish, ChaCha20, and Rabbit in Swift; each file defines pattern matching rules and constraints to detect hard-coded secrets.
tests/__snapshots__/{aes,blowfish,chacha20,rabbit}-hardcoded-secret-swift-snapshot.yml Added snapshot files containing multiple test cases (valid and invalid) for the encryption functions in Swift.
tests/__snapshots__/ruby-mysql2-empty-password-ruby-snapshot.yml Added a Ruby snapshot to test Mysql2 client usage with an empty password, annotated with detailed labels.
tests/swift/*-hardcoded-secret-swift-test.yml Introduced new test configuration files for Swift encryption functions to validate correct and incorrect secret handling scenarios.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant SC as Source Code
    participant RS as Rules Scanner
    participant RE as Rules Engine
    participant Alert as Alert System

    Dev->>SC: Write Swift code with encryption logic
    SC->>RS: Submit code for security scanning
    RS->>RE: Load applicable secret detection rules (AES, Blowfish, ChaCha20, Rabbit)
    RE-->>RS: Return pattern match results
    RS->>Dev: Notify about hard-coded secret detections
Loading

Possibly related PRs

Suggested reviewers

  • ganeshpatro321

Poem

In fields of code I hop with glee,
Uncovering secrets hidden sneakily,
AES, Blowfish, and ChaCha20 in line,
Rabbit rules make security shine 🐇,
Testing snapshots sing a joyful tune,
Burrowing through bugs from morn to noon!
Hoppy coding, everyone!


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai bot changed the title @coderabbitai Add Swift rules and tests for hard-coded encryption secrets Mar 5, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (28)
tests/swift/chacha20-hardcoded-secret-swift-test.yml (1)

15-15: Ensure Newline at End-of-File

YAMLlint flagged a missing newline at the end of the file. Please add a newline character (e.g., pressing Enter after line 15) to ensure compliance with YAML formatting standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/swift/rabbit-hardcoded-secret-swift-test.yml (1)

15-15: Add Newline at End-of-File

The static analysis tool indicates that there is no newline at the end of this file. Please add one to conform to YAMLlint standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/swift/blowfish-hardcoded-secret-swift-test.yml (1)

15-15: Conform to YAML Formatting Standards

A newline at the end of the file is required according to YAMLlint. Please ensure that a newline character is added at the end of line 15.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/__snapshots__/chacha20-hardcoded-secret-swift-snapshot.yml (4)

1-185: Indentation and Formatting Cleanup Required

Several YAMLlint warnings have been noted throughout this file (e.g., expected indentations and trailing spaces). Please review and adjust the overall indentation and remove any trailing whitespace to ensure proper YAML formatting and maintainability.


6-37: Validate Label Duplications in the First Snapshot

The first snapshot block (lines 3–37) for
  ChaCha20(key: "hello", iv: "123")
contains some duplicate label entries (e.g., the two similar entries for (key: "hello", iv: "123")). Verify that these duplications are intentional and add value to the test assertions.


38-89: Consistency Check for Labels in Dynamic Key Snapshot

In the dynamic key snapshot block (lines 38–89), multiple labels reference the conversion of "s33krit" to an array and repeated mentions of password. Please confirm all label ranges accurately capture the intended code segments and that any redundancy is deliberate.


90-185: Review the Use of 'try' Statement in the Final Snapshot

The final snapshot block (lines 90–185) employs the try keyword with a ChaCha20 call. Double-check that the labels (covering both primary and secondary sources) correctly delineate the different segments of the code snippet for error handling scenarios.

rules/swift/security/chacha20-hardcoded-secret-swift.yml (5)

1-59: Indentation and Formatting Cleanup Required

This security rule file shows several YAML formatting warnings. Please review and correct the indentation (as well as any extraneous spaces) in the header and the early sections to comply with YAML standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


60-102: Review Tree-Sitter Pattern in 'match_pattern_try_expression_directly'

The definition of the match_pattern_try_expression_directly pattern uses a regex (^ChaCha20$) and several nested conditions. Please verify that these criteria precisely capture the intended try-expression constructs without introducing false positives.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


103-159: Evaluate Pattern Definitions for 'match_pattern_ChaCha20_statement_directly'

Ensure that the pattern matching for ChaCha20 statements (including call expressions and their suffixes) effectively identifies the intended constructs. Consider validating against sample Swift code to verify that these patterns function as required.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


160-220: Assess the Patterns for Try Expressions with Instances

Both match_pattern_try_expression_with_instance and match_pattern_try_expression_with_utf8 incorporate nuanced conditions (e.g. exclusions for throw keywords). Please double-check that these specifications accurately filter out undesired cases while capturing valid instances of hard-coded ChaCha20 usage.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


221-359: General Rule and Constraint Validation

The rule block correctly aggregates multiple matching patterns, and the constraints section (lines 351–357) defines SECRET as a line string literal. It is advisable to review these intricate nested configurations and, if possible, add inline comments to aid future maintainers.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 221-221: wrong indentation: expected 12 but found 18

(indentation)


[warning] 222-222: wrong indentation: expected 24 but found 22

(indentation)


[warning] 235-235: wrong indentation: expected 24 but found 22

(indentation)


[warning] 237-237: wrong indentation: expected 26 but found 23

(indentation)


[warning] 240-240: wrong indentation: expected 27 but found 26

(indentation)


[error] 249-249: trailing spaces

(trailing-spaces)


[warning] 251-251: wrong indentation: expected 8 but found 6

(indentation)


[warning] 253-253: wrong indentation: expected 10 but found 13

(indentation)


[warning] 254-254: wrong indentation: expected 17 but found 15

(indentation)


[warning] 257-257: wrong indentation: expected 19 but found 18

(indentation)


[warning] 263-263: wrong indentation: expected 14 but found 12

(indentation)


[warning] 264-264: wrong indentation: expected 18 but found 16

(indentation)


[warning] 265-265: wrong indentation: expected 20 but found 18

(indentation)


[warning] 268-268: wrong indentation: expected 18 but found 16

(indentation)


[warning] 269-269: wrong indentation: expected 20 but found 18

(indentation)


[warning] 272-272: wrong indentation: expected 18 but found 20

(indentation)


[warning] 276-276: wrong indentation: expected 18 but found 15

(indentation)


[warning] 279-279: wrong indentation: expected 19 but found 21

(indentation)


[warning] 282-282: wrong indentation: expected 25 but found 22

(indentation)


[warning] 283-283: wrong indentation: expected 28 but found 30

(indentation)


[warning] 287-287: wrong indentation: expected 28 but found 25

(indentation)


[error] 290-290: trailing spaces

(trailing-spaces)


[warning] 292-292: wrong indentation: expected 8 but found 6

(indentation)


[warning] 294-294: wrong indentation: expected 10 but found 13

(indentation)


[warning] 295-295: wrong indentation: expected 17 but found 15

(indentation)


[warning] 298-298: wrong indentation: expected 19 but found 18

(indentation)


[warning] 301-301: wrong indentation: expected 10 but found 7

(indentation)


[warning] 302-302: wrong indentation: expected 13 but found 12

(indentation)


[warning] 305-305: wrong indentation: expected 13 but found 10

(indentation)


[warning] 306-306: wrong indentation: expected 14 but found 12

(indentation)


[warning] 309-309: wrong indentation: expected 13 but found 10

(indentation)


[warning] 310-310: wrong indentation: expected 14 but found 12

(indentation)


[warning] 313-313: wrong indentation: expected 13 but found 20

(indentation)


[warning] 314-314: wrong indentation: expected 24 but found 26

(indentation)


[warning] 317-317: wrong indentation: expected 13 but found 15

(indentation)


[warning] 321-321: wrong indentation: expected 13 but found 15

(indentation)


[warning] 324-324: wrong indentation: expected 19 but found 21

(indentation)


[warning] 327-327: wrong indentation: expected 25 but found 22

(indentation)


[warning] 328-328: wrong indentation: expected 28 but found 30

(indentation)


[warning] 332-332: wrong indentation: expected 28 but found 25

(indentation)


[error] 335-335: trailing spaces

(trailing-spaces)


[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 358-358: too many blank lines

(2 > 0) (empty-lines)

rules/swift/security/blowfish-hardcoded-secret-swift.yml (5)

1-59: Indentation and Formatting Cleanup Required

Similar to other YAML files, this file also shows multiple YAMLlint formatting issues (incorrect indentation and trailing spaces). Please resolve these formatting warnings to ensure clarity and consistency.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


60-102: Double-Check Pattern Matching for Try Expressions

Within the match_pattern_try_expression_directly block for Blowfish, the regex usage (^Blowfish$) and structural conditions should be carefully validated to ensure they correctly identify hard-coded secret instances related to Blowfish without generating false positives.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


103-159: Review Pattern Definitions for Blowfish Statements

Examine the rules defined under match_pattern_Blowfish_statement_directly and others that follow. Confirm that the matching logic—including exclusions for try expressions and throw keywords—is both comprehensive and precise for detecting hard-coded secrets in Blowfish usage.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


160-220: Assessment of Try Expression Patterns with Instances and UTF-8

For the patterns match_pattern_try_expression_with_instance and match_pattern_try_expression_with_utf8, ensure that the configurations (including nested conditions and neighbor-based stopping criteria) are robust. Testing with representative Swift code examples is recommended.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


337-358: General Rule and Constraint Validation

Verify that the aggregated rule block (lines 337–349) properly combines the defined patterns and that the constraints (lines 351–357) correctly enforce the expected structure for line string literals holding secrets.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 357-357: too many blank lines

(1 > 0) (empty-lines)

tests/__snapshots__/aes-hardcoded-secret-swift-snapshot.yml (4)

1-185: Indentation and Formatting Cleanup Required

This AES snapshot file exhibits several formatting issues similar to other YAML files in this PR. Please address all reported indentation inconsistencies and remove trailing whitespaces for clarity and consistency.


3-37: Validate Static Snapshot Labels for Hardcoded AES Key

For the initial snapshot block with
  AES(key: "hello", iv: "123"),
the set of secondary labels (covering the key, IV, and composite expressions) should be reviewed for redundancy—ensure each label serves a clear purpose in validating the snapshot.


38-89: Consistency Check for Dynamic Key Snapshot in AES

The block showing
  let password: Array<UInt8> = Array("s33krit".utf8)
followed by
  AES(key: password, iv: "123")
includes multiple detailed labels. Confirm that these labels accurately represent the dynamic key conversion and that their ranges are consistent with the intended test scenario.


90-146: Review 'try' Snapshot for AES with Error Handling

The final snapshot that uses the try keyword (lines 90–146) should be verified for proper error-handling representation. Ensure that the associated labels clearly capture the separate elements of the call, including the error propagation mechanism.

tests/__snapshots__/ruby-mysql2-empty-password-ruby-snapshot.yml (3)

1-68: Review Ruby Snapshot for Mysql2 Client (Empty Password with Direct String)

The first snapshot demonstrates initializing the Mysql2 client with an explicit empty password (""). Confirm that this example properly illustrates the risk of hard-coded empty passwords and that the labels accurately highlight the client instantiation parts.


69-147: Review Ruby Snapshot for Mysql2 Client (Empty Password via Variable)

In the second snapshot block, the empty password is assigned to a variable (pw = "") before being used in the client initialization. Please ensure that the labels and code differentiate this scenario clearly from the direct empty string usage, providing comprehensive test coverage.


1-147: Indentation and Formatting Cleanup Required

As with other YAML files in this PR, please check and correct any indentation issues and remove trailing spaces across this file to ensure consistency with YAML best practices.

rules/swift/security/rabbit-hardcoded-secret-swift.yml (2)

15-335: Address YAML Indentation Inconsistencies

Static analysis tools have flagged several indentation issues (for instance, line 19 expected 12 spaces but found 13, line 20 expected 17 but found 15, and others throughout this block). These inconsistencies may lead to parsing issues in some YAML parsers. It is recommended to standardize the indentation (e.g. use 2 spaces per level) for clarity and to avoid potential misinterpretation of the configuration.

For example, you can consider a diff like:

-utils:
-    match_pattern_try_expression_directly:
-        kind: try_expression
-        not:
-             inside:
-               stopBy: end
-               kind: call_expression
-               has:
-                  kind: simple_identifier
-                  regex: ^Rabbit$
+utils:
+  match_pattern_try_expression_directly:
+    kind: try_expression
+    not:
+      inside:
+        stopBy: end
+        kind: call_expression
+        has:
+          kind: simple_identifier
+          regex: ^Rabbit$

Please review all nested blocks (e.g. under keys like not:, has:, all:, and follows:) to ensure that the indentation is consistent throughout the file.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


[warning] 221-221: wrong indentation: expected 12 but found 18

(indentation)


[warning] 222-222: wrong indentation: expected 24 but found 22

(indentation)


[warning] 235-235: wrong indentation: expected 24 but found 22

(indentation)


[warning] 237-237: wrong indentation: expected 26 but found 23

(indentation)


[warning] 240-240: wrong indentation: expected 27 but found 26

(indentation)


[error] 249-249: trailing spaces

(trailing-spaces)


[warning] 251-251: wrong indentation: expected 8 but found 6

(indentation)


[warning] 253-253: wrong indentation: expected 10 but found 13

(indentation)


[warning] 254-254: wrong indentation: expected 17 but found 15

(indentation)


[warning] 257-257: wrong indentation: expected 19 but found 18

(indentation)


[warning] 263-263: wrong indentation: expected 14 but found 12

(indentation)


[warning] 264-264: wrong indentation: expected 18 but found 16

(indentation)


[warning] 265-265: wrong indentation: expected 20 but found 18

(indentation)


[warning] 268-268: wrong indentation: expected 18 but found 16

(indentation)


[warning] 269-269: wrong indentation: expected 20 but found 18

(indentation)


[warning] 272-272: wrong indentation: expected 18 but found 20

(indentation)


[warning] 276-276: wrong indentation: expected 18 but found 15

(indentation)


[warning] 279-279: wrong indentation: expected 19 but found 21

(indentation)


[warning] 282-282: wrong indentation: expected 25 but found 22

(indentation)


[warning] 283-283: wrong indentation: expected 28 but found 30

(indentation)


[warning] 287-287: wrong indentation: expected 28 but found 25

(indentation)


[error] 290-290: trailing spaces

(trailing-spaces)


[warning] 292-292: wrong indentation: expected 8 but found 6

(indentation)


[warning] 294-294: wrong indentation: expected 10 but found 13

(indentation)


[warning] 295-295: wrong indentation: expected 17 but found 15

(indentation)


[warning] 298-298: wrong indentation: expected 19 but found 18

(indentation)


[warning] 301-301: wrong indentation: expected 10 but found 7

(indentation)


[warning] 302-302: wrong indentation: expected 13 but found 12

(indentation)


[warning] 305-305: wrong indentation: expected 13 but found 10

(indentation)


[warning] 306-306: wrong indentation: expected 14 but found 12

(indentation)


[warning] 309-309: wrong indentation: expected 13 but found 10

(indentation)


[warning] 310-310: wrong indentation: expected 14 but found 12

(indentation)


[warning] 313-313: wrong indentation: expected 13 but found 20

(indentation)


[warning] 314-314: wrong indentation: expected 24 but found 26

(indentation)


[warning] 317-317: wrong indentation: expected 13 but found 15

(indentation)


[warning] 321-321: wrong indentation: expected 13 but found 15

(indentation)


[warning] 324-324: wrong indentation: expected 19 but found 21

(indentation)


[warning] 327-327: wrong indentation: expected 25 but found 22

(indentation)


[warning] 328-328: wrong indentation: expected 28 but found 30

(indentation)


[warning] 332-332: wrong indentation: expected 28 but found 25

(indentation)


[error] 335-335: trailing spaces

(trailing-spaces)


249-249: Remove Trailing Spaces

Trailing whitespace was detected on lines 249, 290, and 343. Removing these will keep the file clean and prevent potential issues with version control or YAML parsers.

Also applies to: 290-290, 343-343

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 249-249: trailing spaces

(trailing-spaces)

rules/swift/security/aes-hardcoded-secret-swift.yml (2)

15-335: Standardize YAML Indentation in the Utils Block

Similar to the Rabbit rule file, the utils block in this file presents indentation inconsistencies (e.g. warnings on lines 19, 20, 23, etc.). To ensure the YAML is parsed correctly and remains maintainable, please reformat the file by standardizing the indentation (suggested: 2 spaces per level). For instance, you might adjust the block as follows:

-utils:
-    match_pattern_try_expression_directly:
-        kind: try_expression
-        not:
-             inside:
-               stopBy: end
-               kind: call_expression
-               has:
-                  kind: simple_identifier
-                  regex: ^AES$
+utils:
+  match_pattern_try_expression_directly:
+    kind: try_expression
+    not:
+      inside:
+        stopBy: end
+        kind: call_expression
+        has:
+          kind: simple_identifier
+          regex: ^AES$

Be sure to review similar nested blocks (e.g. under match_pattern_AES_statement_directly, match_pattern_AES_expression_with_instance, etc.) to address all reported indentation warnings.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


[warning] 221-221: wrong indentation: expected 12 but found 18

(indentation)


[warning] 222-222: wrong indentation: expected 24 but found 22

(indentation)


[warning] 235-235: wrong indentation: expected 24 but found 22

(indentation)


[warning] 237-237: wrong indentation: expected 26 but found 23

(indentation)


[warning] 240-240: wrong indentation: expected 27 but found 26

(indentation)


[error] 249-249: trailing spaces

(trailing-spaces)


[warning] 251-251: wrong indentation: expected 8 but found 6

(indentation)


[warning] 253-253: wrong indentation: expected 10 but found 13

(indentation)


[warning] 254-254: wrong indentation: expected 17 but found 15

(indentation)


[warning] 257-257: wrong indentation: expected 19 but found 18

(indentation)


[warning] 263-263: wrong indentation: expected 14 but found 12

(indentation)


[warning] 264-264: wrong indentation: expected 18 but found 16

(indentation)


[warning] 265-265: wrong indentation: expected 20 but found 18

(indentation)


[warning] 268-268: wrong indentation: expected 18 but found 16

(indentation)


[warning] 269-269: wrong indentation: expected 20 but found 18

(indentation)


[warning] 272-272: wrong indentation: expected 18 but found 20

(indentation)


[warning] 276-276: wrong indentation: expected 18 but found 15

(indentation)


[warning] 279-279: wrong indentation: expected 19 but found 21

(indentation)


[warning] 282-282: wrong indentation: expected 25 but found 22

(indentation)


[warning] 283-283: wrong indentation: expected 28 but found 30

(indentation)


[warning] 287-287: wrong indentation: expected 28 but found 25

(indentation)


[error] 290-290: trailing spaces

(trailing-spaces)


[warning] 292-292: wrong indentation: expected 8 but found 6

(indentation)


[warning] 294-294: wrong indentation: expected 10 but found 13

(indentation)


[warning] 295-295: wrong indentation: expected 17 but found 15

(indentation)


[warning] 298-298: wrong indentation: expected 19 but found 18

(indentation)


[warning] 301-301: wrong indentation: expected 10 but found 7

(indentation)


[warning] 302-302: wrong indentation: expected 13 but found 12

(indentation)


[warning] 305-305: wrong indentation: expected 13 but found 10

(indentation)


[warning] 306-306: wrong indentation: expected 14 but found 12

(indentation)


[warning] 309-309: wrong indentation: expected 13 but found 10

(indentation)


[warning] 310-310: wrong indentation: expected 14 but found 12

(indentation)


[warning] 313-313: wrong indentation: expected 13 but found 20

(indentation)


[warning] 314-314: wrong indentation: expected 24 but found 26

(indentation)


[warning] 317-317: wrong indentation: expected 13 but found 15

(indentation)


[warning] 321-321: wrong indentation: expected 13 but found 15

(indentation)


[warning] 324-324: wrong indentation: expected 19 but found 21

(indentation)


[warning] 327-327: wrong indentation: expected 25 but found 22

(indentation)


[warning] 328-328: wrong indentation: expected 28 but found 30

(indentation)


[warning] 332-332: wrong indentation: expected 28 but found 25

(indentation)


[error] 335-335: trailing spaces

(trailing-spaces)


249-249: Eliminate Trailing Whitespaces

Trailing spaces were flagged on lines 249, 290, 335, and 343. Removing these will keep the file clean and avoid potential issues in processing.

Also applies to: 290-290, 335-335, 343-343

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 249-249: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09ceb7b and a97bc07.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (13)
  • rules/swift/security/aes-hardcoded-secret-swift.yml (1 hunks)
  • rules/swift/security/blowfish-hardcoded-secret-swift.yml (1 hunks)
  • rules/swift/security/chacha20-hardcoded-secret-swift.yml (1 hunks)
  • rules/swift/security/rabbit-hardcoded-secret-swift.yml (1 hunks)
  • tests/__snapshots__/aes-hardcoded-secret-swift-snapshot.yml (1 hunks)
  • tests/__snapshots__/blowfish-hardcoded-secret-swift-snapshot.yml (1 hunks)
  • tests/__snapshots__/chacha20-hardcoded-secret-swift-snapshot.yml (1 hunks)
  • tests/__snapshots__/rabbit-hardcoded-secret-swift-snapshot.yml (1 hunks)
  • tests/__snapshots__/ruby-mysql2-empty-password-ruby-snapshot.yml (1 hunks)
  • tests/swift/aes-hardcoded-secret-swift-test.yml (1 hunks)
  • tests/swift/blowfish-hardcoded-secret-swift-test.yml (1 hunks)
  • tests/swift/chacha20-hardcoded-secret-swift-test.yml (1 hunks)
  • tests/swift/rabbit-hardcoded-secret-swift-test.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tests/snapshots/blowfish-hardcoded-secret-swift-snapshot.yml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
tests/swift/chacha20-hardcoded-secret-swift-test.yml

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/swift/rabbit-hardcoded-secret-swift-test.yml

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/swift/blowfish-hardcoded-secret-swift-test.yml

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

rules/swift/security/chacha20-hardcoded-secret-swift.yml

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


[warning] 221-221: wrong indentation: expected 12 but found 18

(indentation)


[warning] 222-222: wrong indentation: expected 24 but found 22

(indentation)


[warning] 235-235: wrong indentation: expected 24 but found 22

(indentation)


[warning] 237-237: wrong indentation: expected 26 but found 23

(indentation)


[warning] 240-240: wrong indentation: expected 27 but found 26

(indentation)


[error] 249-249: trailing spaces

(trailing-spaces)


[warning] 251-251: wrong indentation: expected 8 but found 6

(indentation)


[warning] 253-253: wrong indentation: expected 10 but found 13

(indentation)


[warning] 254-254: wrong indentation: expected 17 but found 15

(indentation)


[warning] 257-257: wrong indentation: expected 19 but found 18

(indentation)


[warning] 263-263: wrong indentation: expected 14 but found 12

(indentation)


[warning] 264-264: wrong indentation: expected 18 but found 16

(indentation)


[warning] 265-265: wrong indentation: expected 20 but found 18

(indentation)


[warning] 268-268: wrong indentation: expected 18 but found 16

(indentation)


[warning] 269-269: wrong indentation: expected 20 but found 18

(indentation)


[warning] 272-272: wrong indentation: expected 18 but found 20

(indentation)


[warning] 276-276: wrong indentation: expected 18 but found 15

(indentation)


[warning] 279-279: wrong indentation: expected 19 but found 21

(indentation)


[warning] 282-282: wrong indentation: expected 25 but found 22

(indentation)


[warning] 283-283: wrong indentation: expected 28 but found 30

(indentation)


[warning] 287-287: wrong indentation: expected 28 but found 25

(indentation)


[error] 290-290: trailing spaces

(trailing-spaces)


[warning] 292-292: wrong indentation: expected 8 but found 6

(indentation)


[warning] 294-294: wrong indentation: expected 10 but found 13

(indentation)


[warning] 295-295: wrong indentation: expected 17 but found 15

(indentation)


[warning] 298-298: wrong indentation: expected 19 but found 18

(indentation)


[warning] 301-301: wrong indentation: expected 10 but found 7

(indentation)


[warning] 302-302: wrong indentation: expected 13 but found 12

(indentation)


[warning] 305-305: wrong indentation: expected 13 but found 10

(indentation)


[warning] 306-306: wrong indentation: expected 14 but found 12

(indentation)


[warning] 309-309: wrong indentation: expected 13 but found 10

(indentation)


[warning] 310-310: wrong indentation: expected 14 but found 12

(indentation)


[warning] 313-313: wrong indentation: expected 13 but found 20

(indentation)


[warning] 314-314: wrong indentation: expected 24 but found 26

(indentation)


[warning] 317-317: wrong indentation: expected 13 but found 15

(indentation)


[warning] 321-321: wrong indentation: expected 13 but found 15

(indentation)


[warning] 324-324: wrong indentation: expected 19 but found 21

(indentation)


[warning] 327-327: wrong indentation: expected 25 but found 22

(indentation)


[warning] 328-328: wrong indentation: expected 28 but found 30

(indentation)


[warning] 332-332: wrong indentation: expected 28 but found 25

(indentation)


[error] 335-335: trailing spaces

(trailing-spaces)


[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 358-358: too many blank lines

(2 > 0) (empty-lines)

rules/swift/security/aes-hardcoded-secret-swift.yml

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


[warning] 221-221: wrong indentation: expected 12 but found 18

(indentation)


[warning] 222-222: wrong indentation: expected 24 but found 22

(indentation)


[warning] 235-235: wrong indentation: expected 24 but found 22

(indentation)


[warning] 237-237: wrong indentation: expected 26 but found 23

(indentation)


[warning] 240-240: wrong indentation: expected 27 but found 26

(indentation)


[error] 249-249: trailing spaces

(trailing-spaces)


[warning] 251-251: wrong indentation: expected 8 but found 6

(indentation)


[warning] 253-253: wrong indentation: expected 10 but found 13

(indentation)


[warning] 254-254: wrong indentation: expected 17 but found 15

(indentation)


[warning] 257-257: wrong indentation: expected 19 but found 18

(indentation)


[warning] 263-263: wrong indentation: expected 14 but found 12

(indentation)


[warning] 264-264: wrong indentation: expected 18 but found 16

(indentation)


[warning] 265-265: wrong indentation: expected 20 but found 18

(indentation)


[warning] 268-268: wrong indentation: expected 18 but found 16

(indentation)


[warning] 269-269: wrong indentation: expected 20 but found 18

(indentation)


[warning] 272-272: wrong indentation: expected 18 but found 20

(indentation)


[warning] 276-276: wrong indentation: expected 18 but found 15

(indentation)


[warning] 279-279: wrong indentation: expected 19 but found 21

(indentation)


[warning] 282-282: wrong indentation: expected 25 but found 22

(indentation)


[warning] 283-283: wrong indentation: expected 28 but found 30

(indentation)


[warning] 287-287: wrong indentation: expected 28 but found 25

(indentation)


[error] 290-290: trailing spaces

(trailing-spaces)


[warning] 292-292: wrong indentation: expected 8 but found 6

(indentation)


[warning] 294-294: wrong indentation: expected 10 but found 13

(indentation)


[warning] 295-295: wrong indentation: expected 17 but found 15

(indentation)


[warning] 298-298: wrong indentation: expected 19 but found 18

(indentation)


[warning] 301-301: wrong indentation: expected 10 but found 7

(indentation)


[warning] 302-302: wrong indentation: expected 13 but found 12

(indentation)


[warning] 305-305: wrong indentation: expected 13 but found 10

(indentation)


[warning] 306-306: wrong indentation: expected 14 but found 12

(indentation)


[warning] 309-309: wrong indentation: expected 13 but found 10

(indentation)


[warning] 310-310: wrong indentation: expected 14 but found 12

(indentation)


[warning] 313-313: wrong indentation: expected 13 but found 20

(indentation)


[warning] 314-314: wrong indentation: expected 24 but found 26

(indentation)


[warning] 317-317: wrong indentation: expected 13 but found 15

(indentation)


[warning] 321-321: wrong indentation: expected 13 but found 15

(indentation)


[warning] 324-324: wrong indentation: expected 19 but found 21

(indentation)


[warning] 327-327: wrong indentation: expected 25 but found 22

(indentation)


[warning] 328-328: wrong indentation: expected 28 but found 30

(indentation)


[warning] 332-332: wrong indentation: expected 28 but found 25

(indentation)


[error] 335-335: trailing spaces

(trailing-spaces)


[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 357-357: too many blank lines

(1 > 0) (empty-lines)

rules/swift/security/rabbit-hardcoded-secret-swift.yml

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


[warning] 221-221: wrong indentation: expected 12 but found 18

(indentation)


[warning] 222-222: wrong indentation: expected 24 but found 22

(indentation)


[warning] 235-235: wrong indentation: expected 24 but found 22

(indentation)


[warning] 237-237: wrong indentation: expected 26 but found 23

(indentation)


[warning] 240-240: wrong indentation: expected 27 but found 26

(indentation)


[error] 249-249: trailing spaces

(trailing-spaces)


[warning] 251-251: wrong indentation: expected 8 but found 6

(indentation)


[warning] 253-253: wrong indentation: expected 10 but found 13

(indentation)


[warning] 254-254: wrong indentation: expected 17 but found 15

(indentation)


[warning] 257-257: wrong indentation: expected 19 but found 18

(indentation)


[warning] 263-263: wrong indentation: expected 14 but found 12

(indentation)


[warning] 264-264: wrong indentation: expected 18 but found 16

(indentation)


[warning] 265-265: wrong indentation: expected 20 but found 18

(indentation)


[warning] 268-268: wrong indentation: expected 18 but found 16

(indentation)


[warning] 269-269: wrong indentation: expected 20 but found 18

(indentation)


[warning] 272-272: wrong indentation: expected 18 but found 20

(indentation)


[warning] 276-276: wrong indentation: expected 18 but found 15

(indentation)


[warning] 279-279: wrong indentation: expected 19 but found 21

(indentation)


[warning] 282-282: wrong indentation: expected 25 but found 22

(indentation)


[warning] 283-283: wrong indentation: expected 28 but found 30

(indentation)


[warning] 287-287: wrong indentation: expected 28 but found 25

(indentation)


[error] 290-290: trailing spaces

(trailing-spaces)


[warning] 292-292: wrong indentation: expected 8 but found 6

(indentation)


[warning] 294-294: wrong indentation: expected 10 but found 13

(indentation)


[warning] 295-295: wrong indentation: expected 17 but found 15

(indentation)


[warning] 298-298: wrong indentation: expected 19 but found 18

(indentation)


[warning] 301-301: wrong indentation: expected 10 but found 7

(indentation)


[warning] 302-302: wrong indentation: expected 13 but found 12

(indentation)


[warning] 305-305: wrong indentation: expected 13 but found 10

(indentation)


[warning] 306-306: wrong indentation: expected 14 but found 12

(indentation)


[warning] 309-309: wrong indentation: expected 13 but found 10

(indentation)


[warning] 310-310: wrong indentation: expected 14 but found 12

(indentation)


[warning] 313-313: wrong indentation: expected 13 but found 20

(indentation)


[warning] 314-314: wrong indentation: expected 24 but found 26

(indentation)


[warning] 317-317: wrong indentation: expected 13 but found 15

(indentation)


[warning] 321-321: wrong indentation: expected 13 but found 15

(indentation)


[warning] 324-324: wrong indentation: expected 19 but found 21

(indentation)


[warning] 327-327: wrong indentation: expected 25 but found 22

(indentation)


[warning] 328-328: wrong indentation: expected 28 but found 30

(indentation)


[warning] 332-332: wrong indentation: expected 28 but found 25

(indentation)


[error] 335-335: trailing spaces

(trailing-spaces)


[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 357-357: too many blank lines

(1 > 0) (empty-lines)

rules/swift/security/blowfish-hardcoded-secret-swift.yml

[warning] 19-19: wrong indentation: expected 12 but found 13

(indentation)


[warning] 20-20: wrong indentation: expected 17 but found 15

(indentation)


[warning] 23-23: wrong indentation: expected 19 but found 18

(indentation)


[warning] 49-49: wrong indentation: expected 22 but found 20

(indentation)


[warning] 50-50: wrong indentation: expected 24 but found 22

(indentation)


[warning] 53-53: wrong indentation: expected 22 but found 20

(indentation)


[warning] 54-54: wrong indentation: expected 24 but found 22

(indentation)


[warning] 58-58: wrong indentation: expected 8 but found 5

(indentation)


[warning] 60-60: wrong indentation: expected 9 but found 13

(indentation)


[warning] 61-61: wrong indentation: expected 17 but found 15

(indentation)


[warning] 64-64: wrong indentation: expected 19 but found 18

(indentation)


[warning] 67-67: wrong indentation: expected 9 but found 16

(indentation)


[warning] 95-95: wrong indentation: expected 22 but found 20

(indentation)


[warning] 96-96: wrong indentation: expected 24 but found 22

(indentation)


[warning] 99-99: wrong indentation: expected 22 but found 20

(indentation)


[warning] 100-100: wrong indentation: expected 24 but found 22

(indentation)


[warning] 103-103: wrong indentation: expected 22 but found 20

(indentation)


[warning] 107-107: wrong indentation: expected 8 but found 6

(indentation)


[warning] 109-109: wrong indentation: expected 10 but found 13

(indentation)


[warning] 110-110: wrong indentation: expected 17 but found 15

(indentation)


[warning] 113-113: wrong indentation: expected 19 but found 18

(indentation)


[warning] 116-116: wrong indentation: expected 10 but found 16

(indentation)


[warning] 139-139: wrong indentation: expected 22 but found 18

(indentation)


[warning] 140-140: wrong indentation: expected 24 but found 22

(indentation)


[warning] 154-154: wrong indentation: expected 24 but found 22

(indentation)


[warning] 156-156: wrong indentation: expected 26 but found 23

(indentation)


[warning] 159-159: wrong indentation: expected 27 but found 26

(indentation)


[warning] 169-169: wrong indentation: expected 22 but found 20

(indentation)


[warning] 170-170: wrong indentation: expected 24 but found 22

(indentation)


[warning] 173-173: wrong indentation: expected 22 but found 20

(indentation)


[warning] 174-174: wrong indentation: expected 24 but found 22

(indentation)


[warning] 177-177: wrong indentation: expected 22 but found 20

(indentation)


[warning] 181-181: wrong indentation: expected 8 but found 5

(indentation)


[warning] 183-183: wrong indentation: expected 9 but found 13

(indentation)


[warning] 184-184: wrong indentation: expected 17 but found 15

(indentation)


[warning] 187-187: wrong indentation: expected 19 but found 18

(indentation)


[warning] 190-190: wrong indentation: expected 9 but found 6

(indentation)


[warning] 191-191: wrong indentation: expected 12 but found 9

(indentation)


[warning] 194-194: wrong indentation: expected 13 but found 16

(indentation)


[warning] 213-213: wrong indentation: expected 22 but found 20

(indentation)


[warning] 214-214: wrong indentation: expected 24 but found 22

(indentation)


[warning] 217-217: wrong indentation: expected 22 but found 20

(indentation)


[warning] 218-218: wrong indentation: expected 24 but found 22

(indentation)


[warning] 221-221: wrong indentation: expected 12 but found 18

(indentation)


[warning] 222-222: wrong indentation: expected 24 but found 22

(indentation)


[warning] 235-235: wrong indentation: expected 24 but found 22

(indentation)


[warning] 237-237: wrong indentation: expected 26 but found 23

(indentation)


[warning] 240-240: wrong indentation: expected 27 but found 26

(indentation)


[error] 249-249: trailing spaces

(trailing-spaces)


[warning] 251-251: wrong indentation: expected 8 but found 6

(indentation)


[warning] 253-253: wrong indentation: expected 10 but found 13

(indentation)


[warning] 254-254: wrong indentation: expected 17 but found 15

(indentation)


[warning] 257-257: wrong indentation: expected 19 but found 18

(indentation)


[warning] 263-263: wrong indentation: expected 14 but found 12

(indentation)


[warning] 264-264: wrong indentation: expected 18 but found 16

(indentation)


[warning] 265-265: wrong indentation: expected 20 but found 18

(indentation)


[warning] 268-268: wrong indentation: expected 18 but found 16

(indentation)


[warning] 269-269: wrong indentation: expected 20 but found 18

(indentation)


[warning] 272-272: wrong indentation: expected 18 but found 20

(indentation)


[warning] 276-276: wrong indentation: expected 18 but found 15

(indentation)


[warning] 279-279: wrong indentation: expected 19 but found 21

(indentation)


[warning] 282-282: wrong indentation: expected 25 but found 22

(indentation)


[warning] 283-283: wrong indentation: expected 28 but found 30

(indentation)


[warning] 287-287: wrong indentation: expected 28 but found 25

(indentation)


[error] 290-290: trailing spaces

(trailing-spaces)


[warning] 292-292: wrong indentation: expected 8 but found 6

(indentation)


[warning] 294-294: wrong indentation: expected 10 but found 13

(indentation)


[warning] 295-295: wrong indentation: expected 17 but found 15

(indentation)


[warning] 298-298: wrong indentation: expected 19 but found 18

(indentation)


[warning] 301-301: wrong indentation: expected 10 but found 7

(indentation)


[warning] 302-302: wrong indentation: expected 13 but found 12

(indentation)


[warning] 305-305: wrong indentation: expected 13 but found 10

(indentation)


[warning] 306-306: wrong indentation: expected 14 but found 12

(indentation)


[warning] 309-309: wrong indentation: expected 13 but found 10

(indentation)


[warning] 310-310: wrong indentation: expected 14 but found 12

(indentation)


[warning] 313-313: wrong indentation: expected 13 but found 20

(indentation)


[warning] 314-314: wrong indentation: expected 24 but found 26

(indentation)


[warning] 317-317: wrong indentation: expected 13 but found 15

(indentation)


[warning] 321-321: wrong indentation: expected 13 but found 15

(indentation)


[warning] 324-324: wrong indentation: expected 19 but found 21

(indentation)


[warning] 327-327: wrong indentation: expected 25 but found 22

(indentation)


[warning] 328-328: wrong indentation: expected 28 but found 30

(indentation)


[warning] 332-332: wrong indentation: expected 28 but found 25

(indentation)


[error] 335-335: trailing spaces

(trailing-spaces)


[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 357-357: too many blank lines

(1 > 0) (empty-lines)

🔇 Additional comments (11)
tests/swift/chacha20-hardcoded-secret-swift-test.yml (1)

1-15: Comprehensive ChaCha20 Test Configuration Defined

The new YAML file clearly distinguishes valid and invalid test cases for the ChaCha20 usage. The examples demonstrate both proper usage (with a password-derived key) and multiple invalid cases (hardcoded strings and improper formatting). Overall, the structure is clear and aligns with the security rule guidelines.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/swift/aes-hardcoded-secret-swift-test.yml (1)

1-15: Well-Structured AES Test Configuration

This file defines valid and invalid scenarios for the AES encryption functionality. The test cases are consistent with the ChaCha20 file and clearly show correct usage versus insecure hardcoded keys. The file appears well formatted and effective for its intended purpose.

tests/swift/rabbit-hardcoded-secret-swift-test.yml (1)

1-15: Clear and Detailed Rabbit Test Cases

The Rabbit test configuration successfully covers both valid and invalid initializations. The structure mirrors the other test files, ensuring consistency across encryption tests.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/swift/blowfish-hardcoded-secret-swift-test.yml (1)

1-15: Thorough Blowfish Test Configuration

This new file establishes test cases for the Blowfish encryption scenario, effectively differentiating between secure (password-derived key) and insecure (hardcoded string) implementations. Its structure is clear and mirrors the other test files.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 15-15: no new line character at the end of file

(new-line-at-end-of-file)

tests/__snapshots__/rabbit-hardcoded-secret-swift-snapshot.yml (1)

1-185: Detailed Snapshot File for Rabbit Security Rule

The snapshot file provides extensive details for multiple scenarios of the Rabbit function, including both hardcoded and dynamic key cases. The labels with source, style, and position information are very thorough. Please verify that the specified start and end positions accurately reflect the intended segments in the source code. Additionally, ensure consistency in formatting (including a newline at the end if needed) to adhere to YAML standards.

rules/swift/security/rabbit-hardcoded-secret-swift.yml (3)

1-9: General Rule Metadata is Clear

The rule’s metadata (id, severity, language, and message) is clearly defined and explains the security concern effectively.


10-13: Note Block Provides Useful Context

The note block appropriately references the CWE and gives a good reference URL. This aids in understanding the underlying risk.


336-358: Rule and Constraints Block Review

The rule: and constraints: sections (lines 336–358) are well organized and clearly state the matching logic and secret constraints. Once the indentation issues are resolved, this section should work as expected.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 357-357: too many blank lines

(1 > 0) (empty-lines)

rules/swift/security/aes-hardcoded-secret-swift.yml (3)

1-9: AES Rule Metadata Looks Good

The new rule for detecting hard-coded AES secrets is clearly defined with appropriate severity and a detailed message advising secure practices.


10-13: Note Block Effectively Conveys Security Guidance

The note block correctly documents the associated CWE and provides a reference link for further reading.


336-358: Rule and Constraints Section is Well-Structured

The rule: and constraints: sections (lines 336–358) clearly define the matching criteria and constraints for a hard-coded AES secret. Once the indentation and trailing space issues are resolved, this configuration is solid.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 341-341: too many spaces after colon

(colons)


[error] 343-343: trailing spaces

(trailing-spaces)


[warning] 346-346: wrong indentation: expected 14 but found 12

(indentation)


[warning] 351-351: wrong indentation: expected 4 but found 6

(indentation)


[warning] 352-352: wrong indentation: expected 10 but found 8

(indentation)


[warning] 354-354: wrong indentation: expected 12 but found 14

(indentation)


[warning] 357-357: too many blank lines

(1 > 0) (empty-lines)

@ganeshpatro321 ganeshpatro321 merged commit 951b38c into main Mar 7, 2025
2 checks passed
@ganeshpatro321 ganeshpatro321 deleted the rule-blowfish_chacha20_aes_rabbit-hardcoded-secret-swift branch March 7, 2025 06:26
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.

2 participants