Skip to content

Update infisical-secrets-check.yml #29

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
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/infisical-secrets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Run scan
shell: bash
run: infisical scan --redact -f csv -r secrets-result.csv 2>&1 | tee secrets-result.log
run: infisical scan --redact -f csv -r secrets-result.csv 2>&1 | tee >(sed -r 's/\x1b\[[0-9;]*m//g' > secrets-result.log)

- name: Read secrets-result.log
uses: guibranco/github-file-reader-action-v2@v2.1.535
Comment on lines 30 to 36

Choose a reason for hiding this comment

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

CODE REVIEW

The change to the Run scan step aims to remove ANSI color codes from the logs. This enhancement improves readability and processing of the log file for subsequent actions.

Suggestions:

  1. Add a comment explaining the use of sed to remove color codes for maintainability.
- name: Run scan
  shell: bash
  run: |
    infisical scan --redact -f csv -r secrets-result.csv 2>&1 | \
    tee >(sed -r 's/\x1b\[[0-9;]*m//g' > secrets-result.log) # Removing ANSI color codes

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
```
message-failure: |
**Infisical secrets check:** :rotating_light: Secrets leaked!.
**Infisical secrets check:** :rotating_light: Secrets leaked!
**Scan results:**
```
Comment on lines 61 to 67

Choose a reason for hiding this comment

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

CODE REVIEW

The change seems to remove an extra period without affecting functionality. Check if this aligns with the desired message style.

Improvement Suggestion:
For better readability, consider simplifying the format.

message-failure: |
  **Infisical secrets check:** :rotating_light: Secrets leaked!

  **Scan results:**

This preserves clarity in the message.

Expand All @@ -72,4 +72,4 @@ jobs:
${{ steps.report.outputs.contents }}
```
message-cancelled: |
**Infisical secrets check:** :o: Secrets check cancelled!.
**Infisical secrets check:** :o: Secrets check cancelled!
Comment on lines 72 to +75

Choose a reason for hiding this comment

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

CODE REVIEW

Your change corrects punctuation, which improves clarity. However, consider making the message more concise for better readability.

Suggestion:

  • Removing redundancy in the message.
message-cancelled: |
  **Infisical secrets check:** :o: Cancelled!