terrascan-action icon indicating copy to clipboard operation
terrascan-action copied to clipboard

Terrascan skip flag not working

Open AnkitRao17 opened this issue 3 years ago • 6 comments

Hi Team,

When using the terrascan github action, the skip flag does not seem to work.

Flag used in below format: skip_rules: AC_AWS_0460

Further, can anyone please share the inventory with the details of all rules and the correct ids to be used for skip flag.

Could not find rule details for "S3 Access log"policy in any documentation.

-TIA

AnkitRao17 avatar Sep 21 '21 16:09 AnkitRao17

Hi, @AnkitRao17 does the skip_rules flag works for you when using Terrascan locally outside of the action?

The inventory of the latest policies included by default on Terrascan is here: https://github.com/accurics/terrascan/tree/master/pkg/policies/opa/rego We also keep a manually updated human-readable version here: https://runterrascan.io/docs/policies/

cesar-rodriguez avatar Oct 17 '21 02:10 cesar-rodriguez

Hi @cesar-rodriguez ,

Apologies for the late response. The skip flag works locally when using terrascan. But through the action, it somehow doesn't seem to work. Also, can you please provide insights on which rule id to use while using the skip flag ?

AnkitRao17 avatar Nov 05 '21 11:11 AnkitRao17

Same for me, the github action:

  terrascan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: tenable/terrascan-action@main
        with:
          skip_rules: "AC_DOCKER_0020,AC_DOCKER_0041"
          verbose: true

The log:

...
Executing terrascan as follows:
terrascan scan  -d . --skip-rules='AC_DOCKER_0020,AC_DOCKER_0041' -v --repo-url ... --repo-ref main
...
Violation Details -
...
	Rule ID        :	AC_DOCKER_0020
...
	Rule ID        :	AC_DOCKER_0041
...

yellowhat avatar Jun 17 '22 08:06 yellowhat

same here

etienne-napoleone avatar Oct 28 '22 12:10 etienne-napoleone

Same here. Tried using skip_rules: "AC_AWS_0207" and skip_rules: "AWS.S3Bucket.EncryptionandKeyManagement.High.0405" but neither worked.

loganmarchione avatar Mar 29 '23 02:03 loganmarchione

Did anyone get this to work?

anwarnk avatar Aug 18 '23 07:08 anwarnk