Checkmarx / ast-github-action

Checkmarx application security testing (AST) GitHub action
https://github.com/marketplace/actions/checkmarx-ast-github-action
Apache License 2.0
16 stars 23 forks source link

[REQ] Sample with API Key as a credential #69

Open kfeeley opened 2 years ago

kfeeley commented 2 years ago

Is your request related to a workflow problem?

Getting started with using an API Key as a credential was tough. I was able to get things working by looking at the CLI parameters and the solution ended up being very simple.

Propose a solution

I can open a PR containing the sample YAML.

name: Checkmarx AST Scan
on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Checkmarx AST CLI Action
        uses: checkmarx/ast-github-action@main #Github Action version
        with:
          base_uri: https://ast.checkmarx.net/
          cx_tenant: your_tenant
          additional_params: --apikey ${{ secrets.CX_API_KEY }}

Additional comments

This is not a change to the action itself, but just the addition of a sample, like the ones here: https://github.com/Checkmarx/ast-github-action/tree/main/sample-yml

pedrompflopes commented 2 years ago

@kfeeley We are reviewing your PR. Thanks for the collaboration.

kfeeley commented 2 years ago

Thanks. I could also help out in a solution where the API key is passed in as an "api_key" input parameter in the action metadata file if you all feel that is a better solution.

lmf-ggal commented 6 months ago

Why you've removed APIkey possibility? as i see in : https://checkmarx.com/resource/documents/en/34965-68653-utils.html#UUID-f7245425-72b9-9854-a60a-a9f37e0173d9_id_env-Usingtheenvcommand It's possible to send EnvVar.

It's possible to add It ?