diff --git a/README.md b/README.md index 749658f..6b3c172 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ inputs: Steps for using Install-action in a workflow yaml file - Checkout into the repo using checkout action. -- Utilize the accuknox/container-scan-action repository with version tag v1. +- Utilize the accuknox/container-scan-action repository with version tag v0.0.1. ### Token Generation from Accuknox SaaS and Viewing Tenant ID @@ -64,7 +64,7 @@ Click on Generate: ```yaml - name: Run AccuKnox CSPM Scan - uses: accuknox/container-scan-action@v1 + uses: accuknox/container-scan-action@v0.0.1 with: token: tenant_id: @@ -98,7 +98,7 @@ jobs: uses: actions/checkout@main - name: Run AccuKnox CSPM Scan - uses: accuknox/container-scan-action@v1 + uses: accuknox/container-scan-action@v0.0.1 with: token: tenant_id: diff --git a/action.yaml b/action.yaml index 1e509c5..2546a22 100644 --- a/action.yaml +++ b/action.yaml @@ -36,7 +36,9 @@ runs: using: 'composite' steps: - name: Validate Inputs - run: python ./validate_inputs.py + run: | + curl -o validate_inputs.py https://raw.githubusercontent.com/accuknox/container-scan-action/main/validate_inputs.py + python validate_inputs.py shell: bash env: DOCKERFILE_CONTEXT: ${{ inputs.dockerfile_context }} diff --git a/validate_inputs.py b/validate_inputs.py index c805803..dcc372c 100644 --- a/validate_inputs.py +++ b/validate_inputs.py @@ -13,18 +13,6 @@ def validate_inputs(inputs): if 'REPOSITORY_NAME' not in inputs or not inputs['REPOSITORY_NAME']: errors.append("Repository name is required.") - if 'SEVERITY' in inputs: - valid_severities = {'UNKNOWN', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL'} - severity = inputs['SEVERITY'].upper() - if severity not in valid_severities: - errors.append("Invalid severity level provided.") - - - if 'CODE' in inputs: - code = inputs['CODE'] - if code not in {'0', '1'}: - errors.append("Invalid code value provided.") - return errors def main(): inputs = {