Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ phases:
- ./run-unit-tests.sh
artifacts:
files:
- .gitignore
- deployment/**/*
- source/**/*
- CHANGELOG.md
- buildspec.yml
- NOTICE.txt
- sonar-project.properties
- '**/*'
exclude-paths:
- '**/.pytest_cache/**/*'
- '**/__pycache__/**/*'
- source/node_modules/**/*
- deployment/.venv/**/*
- deployment/temp/**/*
2 changes: 1 addition & 1 deletion deployment/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: SO0111
name: security-hub-automated-response-and-remediation
version: 2.0.0
version: 2.0.1
cloudformation_templates:
- template: aws-sharr-deploy.template
main_template: true
Expand Down
2 changes: 1 addition & 1 deletion deployment/testing_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jmespath==0.10.0
python-dateutil==2.8.2
s3transfer==0.5.2
six==1.16.0
urllib3==1.26.9
urllib3==1.26.11
90 changes: 30 additions & 60 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,66 +1,36 @@
# Note: Currently testing and supported with code coverage sonarqube
# collection for python lambda (python pytest, python unittest) and javascript jest
# and CDK TypeScript
# scan templates in cdk.out even though they are in .gitignore
sonar.scm.exclusions.disabled = true

# Uncomment to enable debugging by default
# sonar.verbose=true
# sonar.log.level=DEBUG
sonar.sources = source/

# Disable if needed
sonar.scm.disabled=true
sonar.exclusions = \
**/test/**/*, \
source/jest.config.ts, \
source/coverage/**/*

#
# Refer to https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/
# for details on sources and exclusions. Note also .gitignore
#
sonar.sources= \
source
sonar.tests = \
source/LambdaLayers/test/, \
source/Orchestrator/test/, \
source/playbooks/AFSBP/test/, \
source/playbooks/AFSBP/ssmdocs/scripts/test/, \
source/playbooks/CIS120/test/, \
source/playbooks/CIS140/test/, \
source/playbooks/common/test/, \
source/playbooks/NEWPLAYBOOK/test/, \
source/playbooks/NEWPLAYBOOK/ssmdocs/scripts/test/, \
source/playbooks/PCI321/test/, \
source/playbooks/PCI321/ssmdocs/scripts/test/, \
source/playbooks/SC/test/, \
source/playbooks/SC/ssmdocs/scripts/test/, \
source/remediation_runbooks/scripts/test/, \
source/solution_deploy/source/test/, \
source/test/

# LambdaLayers modules are excluded from lambda folders, where they must be copied for testing
# These files are tested in LambdaLayers
sonar.exclusions= \
**/test/**, \
**/tests/**, \
**/node_modules/**, \
**/python_tests/**, \
**/jest.config.js, \
source/**.js, \
deployment/build/**, \
**/requests/**, \
**/charset_normalizer/**, \
**/chardet/**, \
**/urllib3/**, \
**/idna/**, \
**/certifi/**, \
**/coverage/**, \
**/bin/*.ts, \
deployment/temp/**, \
simtest/**

sonar.tests= \
source/Orchestrator/test, \
source/test, \
source/LambdaLayers/test, \
source/playbooks/AFSBP/test, \
source/playbooks/AFSBP/ssmdocs/scripts/test, \
source/playbooks/CIS120/test, \
source/playbooks/PCI321/test, \
source/playbooks/PCI321/ssmdocs/scripts/test, \
source/solution_deploy/source/test, \
source/remediation_runbooks/scripts/test
sonar.python.version = 3.8, 3.9, 3.10, 3.11
sonar.python.coverage.reportPaths = deployment/test/coverage-reports/*.coverage.xml

sonar.sourceEncoding=UTF-8
sonar.javascript.lcov.reportPaths = source/coverage/lcov.info

## Python Specific Properties*
# coverage
# https://docs.sonarqube.org/pages/viewpage.action?pageId=4784149
# Comma-separated list of ant pattern describing paths to coverage reports, relative to projects
# root. Leave unset to use the default ("coverage-reports/*coverage-*.xml").
sonar.python.coverage.reportPaths=deployment/test/coverage-reports/*.coverage.xml

# Sensor SonarJS Coverage [javascript] was not allowing globbing
# for sonar.javascript.lcov.reportPaths such as this
# source/test/coverage-reports/jest/*/lcov.info
# so we have to provide an explicit list of reportPaths
sonar.javascript.lcov.reportPaths= \
source/coverage/lcov.info
sonar.issue.ignore.multicriteria = ts1
sonar.issue.ignore.multicriteria.ts1.ruleKey = typescript:S1848
sonar.issue.ignore.multicriteria.ts1.resourceKey = **/*.ts
4 changes: 2 additions & 2 deletions source/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-security-hub-automated-response-and-remediation",
"version": "2.0.0",
"version": "2.0.1",
"description": "Automated remediation for AWS Security Hub (SO0111)",
"bin": {
"solution_deploy": "bin/solution_deploy.js"
Expand Down