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

Adding terrascan config file (#1761) #149

Merged
merged 2 commits into from
Aug 9, 2021

Conversation

sarahc23
Copy link

@sarahc23 sarahc23 commented Jul 29, 2021

git cherry-pick of upstream commit to add terrascan config files

Original description below:

  • adding terrascan config file

  • fix line ending

Co-authored-by: Admiral Awkbar admiralawkbar@github.com

* adding terrascan config file

* fix line ending

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>

# skip rules (list of rules to skip)
skip-rules = [
"AC_AWS_0320"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this in the correct format?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mark-McAdam - Could you add the SG rule we should be adding here.

Copy link

@Mark-McAdam Mark-McAdam Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially had a hard time tracking down the rules initially. I discovered this group of rules with reference id.
We had success adding rules to skip to terrascan.toml by using the reference id, the example that is commented out uses the reference.id
https://github.com/accurics/terrascan/blob/master/docs/policies/aws.md#aws_security_group

'SSH' (TCP:22) is accessible by a CIDR block range
AWS.ALB.NetworkPortsSecurity.High.0194

ssh port open to internet
AWS.SecurityGroup.NetworkPortsSecurity.Low.0560

One of these might give you the result you are looking for.

Here is a link to the rules we added to the ttam-tf-app-stack repo.
https://github.com/23andme-private/ttam-tf-app-stack/blob/main/.github/linters/terrascan.toml

Looking into this farther it appears some rule id are in the form of
AC_AWS_0351
and some appear to be of the form
AWS.SecurityGroup.NetworkPortsSecurity.Low.0560

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The terrascan devs themselves suggest using reference ids, so that was the advice I was going by.

@sarahc23 sarahc23 force-pushed the SEC-1517-default-terrascan-config branch from de91179 to 4f776d1 Compare August 5, 2021 22:15
@sarahc23 sarahc23 merged commit 3acea45 into master Aug 9, 2021
@sarahc23 sarahc23 deleted the SEC-1517-default-terrascan-config branch August 9, 2021 11:03
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.

4 participants