-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from udit-uniyal/main
Updated action.yaml and readme.md
- Loading branch information
Showing
2 changed files
with
42 additions
and
81 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 |
---|---|---|
@@ -1,61 +1,25 @@ | ||
# install-action | ||
|
||
Github actions to install AccuKnox IaC Scanner. | ||
# Automate Infrastructure as Code Security Checks with AccuKnox GitHub Action | ||
|
||
## Learn More | ||
|
||
- [About Accuknox](https://www.accuknox.com/) | ||
|
||
## Inputs | ||
|
||
```yaml | ||
name: 'Accuknox IaC Scan' | ||
description: 'Run Scan against infrastructure as code.' | ||
inputs: | ||
file: | ||
description: 'File with infrastructure code or packages to scan' | ||
required: false | ||
directory: | ||
default: '.' | ||
description: 'Directory with infrastructure code and/or package manager files to scan' | ||
required: false | ||
compact: | ||
description: 'Do not display code blocks in output' | ||
required: false | ||
quiet: | ||
description: 'display only failed checks' | ||
required: false | ||
output_format: | ||
description: 'The format of the output. cli, json, junitxml, github_failed_only, or sarif (comma separated)' | ||
required: false | ||
default: 'json' | ||
output_file_path: | ||
description: 'Path and name for output file, needs to end with a comma for a single output format' | ||
required: false | ||
soft_fail: | ||
description: 'do not return an error code if there are failed checks' | ||
required: false | ||
framework: | ||
description: 'run only on a specific infrastructure' | ||
required: false | ||
skip_framework: | ||
description: 'skip a specific infrastructure' | ||
required: false | ||
github_pat: | ||
description: 'Environment variable name for a Github personal access token for scanning external modules sourced from private repositories' | ||
required: false | ||
token: | ||
description: 'The token for authenticating with the CSPM panel.' | ||
required: true | ||
tenant_id: | ||
description: 'The ID of the tenant associated with the CSPM panel.' | ||
required: true | ||
endpoint: | ||
description: 'The URL of the CSPM panel to push the scan results to.' | ||
required: true | ||
default: 'cspm.demo.accuknox.com' | ||
``` | ||
|
||
| Input Values | Description | Optional/Required | Default Values | | ||
|--------------|-------------|-------------------|----------------| | ||
| file | Specify a file for scanning; cannot be used with directory input. Filter runners by file type, e.g., '.tf' for Terraform. | Optional | - | | ||
| directory | Directory with infrastructure code and/or package manager files to scan | Optional | `.` | | ||
| compact | Do not display code blocks in output | Optional | - | | ||
| quiet | Display only failed checks | Optional | - | | ||
| output_format | The format of the output. Options: cli, json, junitxml, github_failed_only, or sarif (comma-separated) | Optional | `json` | | ||
| output_file_path | Path and name for the output file, needs to end with a comma for a single output format | Optional | ./results.json | | ||
| soft_fail | Do not return an error code if there are failed checks | Optional | - | | ||
| framework | Run only on a specific infrastructure, values can be Kubernetes or Terraform. | Optional | - | | ||
| skip_framework | Skip a specific infrastructure | Optional | - | | ||
| baseline | Path to a baseline file to compare. Report will include only failed checks that are not in the baseline | Optional | `baseline` | | ||
| token | The token for authenticating with the CSPM panel | Required | - | | ||
| tenant_id | The ID of the tenant associated with the CSPM panel | Required | - | | ||
| endpoint | The URL of the CSPM panel to push the scan results to | Optional | `cspm.demo.accuknox.com` | | ||
## Usage | ||
|
||
Steps for using Install-action in a workflow yaml file | ||
|
@@ -84,17 +48,18 @@ Click on Generate: | |
- name: Run IaC scan | ||
uses: accuknox/[email protected] | ||
with: | ||
file: | ||
directory: | ||
compact: | ||
quiet: | ||
output_file_path: | ||
framework: | ||
skip_framework: | ||
soft_fail: | ||
github_pat: | ||
file: #Optional | ||
directory: #Optional | ||
compact: #Optional | ||
quiet: #Optional | ||
output_format: #Optional | ||
output_file_path: #Optional | ||
framework: #Optional | ||
skip_framework: #Optional | ||
soft_fail: #Optional | ||
endpoint: #Optional | ||
baseline: #Optional | ||
token: | ||
endpoint: | ||
tenant_id: | ||
``` | ||
|
@@ -126,14 +91,15 @@ jobs: | |
file: | ||
directory: | ||
compact: | ||
quiet: | ||
quiet: | ||
output_format: | ||
output_file_path: | ||
framework: | ||
skip_framework: | ||
soft_fail: | ||
github_pat: | ||
token: | ||
endpoint: | ||
tenant_id: | ||
endpoint: | ||
baseline: | ||
token: ${{ secrets.TOKEN }} | ||
tenant_id: ${{ secrets.TENANT_ID }} | ||
|
||
``` |
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