-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/terraform-variables
- Loading branch information
Showing
196 changed files
with
3,321 additions
and
2,921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
CHANGES=$(git log --oneline $(git describe --tags --match 'nightly' --abbrev=0)..HEAD) | ||
if [[ -n ${CHANGES} ]]; then | ||
echo 'yes' | ||
else | ||
echo 'no' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
with: | ||
go-version: 1.16.x | ||
- name: golangci-lint | ||
uses: golangci/[email protected].1 | ||
uses: golangci/[email protected].2 | ||
with: | ||
version: v1.37 | ||
args: -c .golangci.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,43 +6,49 @@ on: | |
workflow_dispatch: | ||
|
||
jobs: | ||
goreleaser: | ||
pre_release_job: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
changes: ${{ steps.lasttag.outputs.newchanges }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check if there are new commits since last nightly | ||
id: sincelasttag | ||
run: echo "::set-output name=commits=$(git log --oneline $(git describe --tags --match 'nightly' --abbrev=0)..HEAD)" | ||
id: lasttag | ||
run: echo "::set-output name=newchanges::$(bash ./.github/new_changes_nightly.sh)" | ||
goreleaser: | ||
needs: pre_release_job | ||
if: ${{ needs.pre_release_job.outputs.changes == 'yes' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
if: steps.sincelasttag.outputs.commits != "" | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- name: Set short hash | ||
if: steps.sincelasttag.outputs.commits != "" | ||
id: shorthash | ||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | ||
- name: Run GoReleaser | ||
if: steps.sincelasttag.outputs.commits != "" | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist --config="./.goreleaser-nightly.yml" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: delete release | ||
if: steps.sincelasttag.outputs.commits != "" | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
delete_release: true # default: false | ||
tag_name: nightly # tag name to delete | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create Release | ||
if: steps.sincelasttag.outputs.commits != "" | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
|
@@ -53,11 +59,9 @@ jobs: | |
draft: false | ||
prerelease: true | ||
- name: Display assets | ||
if: steps.sincelasttag.outputs.commits != "" | ||
run: | | ||
ls -l /home/runner/work/kics/kics/dist | ||
- name: Upload Release Asset Linux | ||
if: steps.sincelasttag.outputs.commits != "" | ||
id: upload-release-asset-linux | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
|
@@ -68,7 +72,6 @@ jobs: | |
asset_name: kics_nightly-release_linux_amd64.tar.gz | ||
asset_content_type: application/gzip | ||
- name: Upload Release Asset Darwin | ||
if: steps.sincelasttag.outputs.commits != "" | ||
id: upload-release-asset-darwin | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
|
@@ -79,7 +82,6 @@ jobs: | |
asset_name: kics_nightly-release_darwin_amd64.tar.gz | ||
asset_content_type: application/gzip | ||
- name: Upload Release Asset Windows | ||
if: steps.sincelasttag.outputs.commits != "" | ||
id: upload-release-asset-windows | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
|
@@ -90,7 +92,6 @@ jobs: | |
asset_name: kics_nightly-release_windows_amd64.zip | ||
asset_content_type: application/zip | ||
- name: Upload Release Asset Checksum | ||
if: steps.sincelasttag.outputs.commits != "" | ||
id: upload-release-asset-checksums | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
|
@@ -102,6 +103,8 @@ jobs: | |
asset_content_type: text/plain | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
needs: pre_release_job | ||
if: ${{ needs.pre_release_job.outputs.changes == 'yes' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
..._volume_encrytpion_disabled/metadata.json → ..._volume_encryption_disabled/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"id": "4b6012e7-7176-46e4-8108-e441785eae57", | ||
"queryName": "EBS Volume Encryption Disabled", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"category": "Encryption", | ||
"descriptionText": "EBS Encryption should be enabled", | ||
"descriptionUrl": "https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_vol_module.html#parameter-encrypted", | ||
"platform": "Ansible" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...sabled/test/positive_expected_result.json → ...sabled/test/positive_expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
[ | ||
{ | ||
"queryName": "EBS Volume Encryption Disabled", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"line": 5 | ||
}, | ||
{ | ||
"queryName": "EBS Volume Encryption Disabled", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"line": 12 | ||
}, | ||
{ | ||
"queryName": "EBS Volume Encryption Disabled", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"line": 19 | ||
}, | ||
{ | ||
"queryName": "EBS Volume Encryption Disabled", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"line": 24 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"id": "bd77554e-f138-40c5-91b2-2a09f878608e", | ||
"queryName": "EFS Without KMS", | ||
"severity": "HIGH", | ||
"category": "Secret Management", | ||
"descriptionText": "Elastic File System (EFS) must have KMS Key ID", | ||
"descriptionUrl": "https://docs.ansible.com/ansible/latest/collections/community/aws/efs_module.html#parameter-kms_key_id", | ||
"platform": "Ansible" | ||
"id": "bd77554e-f138-40c5-91b2-2a09f878608e", | ||
"queryName": "EFS Without KMS", | ||
"severity": "HIGH", | ||
"category": "Encryption", | ||
"descriptionText": "Elastic File System (EFS) must have KMS Key ID", | ||
"descriptionUrl": "https://docs.ansible.com/ansible/latest/collections/community/aws/efs_module.html#parameter-kms_key_id", | ||
"platform": "Ansible" | ||
} |
4 changes: 2 additions & 2 deletions
4
assets/queries/ansible/aws/iam_policies_with_full_privileges/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"id": "e401d614-8026-4f4b-9af9-75d1197461ba", | ||
"queryName": "IAM Policies With Full Privileges", | ||
"severity": "MEDIUM", | ||
"severity": "HIGH", | ||
"category": "Access Control", | ||
"descriptionText": "IAM policies that allow full administrative privileges (for all resources)", | ||
"descriptionUrl": "https://docs.ansible.com/ansible/latest/collections/community/aws/iam_managed_policy_module.html", | ||
"platform": "Ansible" | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
.../queries/ansible/aws/iam_policies_with_full_privileges/test/positive_expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[ | ||
{ | ||
"queryName": "IAM Policies With Full Privileges", | ||
"severity": "MEDIUM", | ||
"severity": "HIGH", | ||
"line": 8 | ||
} | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
...le/aws/s3_bucket_acl_allows_read_or_write_to_all_users/test/positive_expected_result.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
..._read_or_write_to_all_users/metadata.json → ..._action_from_all_principals/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
...s/s3_bucket_allows_writeacp_action_from_all_principals/test/positive_expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"queryName": "S3 Bucket Allows WriteACP Action From All Principals", | ||
"severity": "HIGH", | ||
"line": 8 | ||
} | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
assets/queries/ansible/aws/s3_bucket_without_versioning/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"id": "9232306a-f839-40aa-b3ef-b352001da9a5", | ||
"queryName": "S3 Bucket Without Versioning", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"category": "Observability", | ||
"descriptionText": "S3 bucket without versioning", | ||
"descriptionUrl": "https://docs.ansible.com/ansible/latest/collections/amazon/aws/s3_bucket_module.html#parameter-versioning", | ||
"platform": "Ansible" | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
assets/queries/ansible/aws/s3_bucket_without_versioning/test/positive_expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[ | ||
{ | ||
"queryName": "S3 Bucket Without Versioning", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"line": 3 | ||
}, | ||
{ | ||
"queryName": "S3 Bucket Without Versioning", | ||
"severity": "HIGH", | ||
"severity": "MEDIUM", | ||
"line": 15 | ||
} | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
assets/queries/ansible/azure/blob_container_with_public_access/metadata.json
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...ueries/ansible/azure/blob_container_with_public_access/test/positive_expected_result.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
assets/queries/ansible/azure/log_disconnections_is_not_set/metadata.json
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...ts/queries/ansible/azure/log_disconnections_is_not_set/test/positive_expected_result.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.