Skip to content
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

[0.1.4] Github annotation off-by-one bug fix. #8

Merged
merged 2 commits into from Jan 11, 2022
Merged

[0.1.4] Github annotation off-by-one bug fix. #8

merged 2 commits into from Jan 11, 2022

Conversation

darkarnium
Copy link
Contributor

Overview

πŸ› οΈ New Features

  • N/A

🍩 Improvements

  • Pulls in latest STACS rules (r57ce3ce).

πŸ› Bug Fixes

  • Fix off-by-one edge case which caused Github pull-request annotation to fail.
    • This was triggered when a new file was added in a pull-request containing a credential on the first line.

Fixed an edge case where a new file with a finding on the first line
would incorrectly calculate the comment position.

Added regression tests for this situation.
@github-actions
Copy link

❌ STACS Finding

STACS has found a potential static token or credential at line 1 of tests/fixtures/ci/credential.txt due to potential AWS access key found.

Finding Sample
...aws_access_key_id=AKIAZJ3PDTI2R9JLXCTH
aws_secret_key_id=39...

If this credential is valid it should be immediately revoked, and the cause of this credential making it into this file investigated.

If this finding is against a 'fake' credential, such as in a test fixture, this finding can be suppressed using an ignore list in the root of this repository. A basic ignore list entry can be found below which may be suitable, otherwise, please refer to the STACS documentation

Example Suppression
{
    "ignore": [
        {
            "pattern": "tests/fixtures/ci/credential\\.txt$",
            "reason": "A reason for this suppression"
        }
    ],
    "include": []
}

[V:0.4.4, R:CredentialCloudAWSAccessKey, F:ddf2c31a0f0978a5f4f3dc21c84d0f2dfd4dc135]

@darkarnium darkarnium merged commit ac4801d into main Jan 11, 2022
@darkarnium darkarnium deleted the 0.1.4 branch January 11, 2022 01:47
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.

None yet

1 participant