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

bug(githubactions): github actions relative path detected as not pinned #6957

Closed
cw-alexcroteau opened this issue Mar 18, 2024 · 1 comment · Fixed by #6958
Closed

bug(githubactions): github actions relative path detected as not pinned #6957

cw-alexcroteau opened this issue Mar 18, 2024 · 1 comment · Fixed by #6958
Labels
appsec bug Something isn't working community Community contribution docker Docker query

Comments

@cw-alexcroteau
Copy link
Contributor

Expected Behavior

KICS should not detect rule "Unpinned Actions Full Length Commit SHA" when a relative path is used in the uses field in a Github Actions workflow.

Actual Behavior

The "Action is not pinned to a full length commit SHA." rule (555ab8f9-2001-455e-a077-f2d0f41e2fb9) shows as failed for action at step relative-path, which has a relative path in the same repository.

Steps to Reproduce the Problem

  1. Create a minimal github action (.github/workflows/sample.yml):
name: Sample
on:
  workflow_call:
permissions: read-all
jobs:
  sample:
    name: Sample
    runs-on: ubuntu-latest
    steps:
      - name: Relative path action
        id: relative-path
        uses: ./any-action
  1. Run KICS docker run -t -v $(pwd)/.github:/path checkmarx/kics:latest scan -p /path -o "/path/" --report-formats "json,sarif,html"
  2. Look at the findings, a finding is listed as described above

Specifications

(N/A if not applicable)

  • Version: v1.7.13, through the latest tag in Docker
  • Platform: macOS 13.6 (22G120)
  • Subsystem: N/A
@JoaoAtGit
Copy link
Contributor

JoaoAtGit commented Mar 20, 2024

Hi @cw-alexcroteau

How are you?
Thanks for your contribution.
Just request for our AppSec to review the issue.

Br,
João Martins
[ APPSEC-2397 ]

@cw-alexcroteau cw-alexcroteau changed the title bug(github_actions): github actions relative path detected as not pinned bug(githubactions): github actions relative path detected as not pinned Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec bug Something isn't working community Community contribution docker Docker query
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants