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
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Customize the scan with additional options:
include_paths: 'src/,lib/'
exclude_paths: 'test/,docs/'
scan_timeout: '600'
scanners: 'sast,sca,secrets'
```

## Inputs
Expand All @@ -66,6 +67,38 @@ Customize the scan with additional options:
| `include_paths` | Comma-separated paths to include in scan | No | `''` (all files) |
| `exclude_paths` | Comma-separated paths to exclude from scan | No | `''` (none) |
| `scan_timeout` | Scan timeout in seconds | No | `300` |
| `scanners` | Security scanners to run | No | `sast,sca` |

## Scanner Options

The `scanners` parameter allows you to customize which security scanners run during analysis:

- **`sast`** - Static Application Security Testing (code vulnerabilities)
- **`sca`** - Software Composition Analysis (dependency vulnerabilities)
- **`secrets`** - Secret detection (API keys, passwords, tokens)
- **`antipatterns`** - Code quality and duplicate code detection
- **`iac`** - Infrastructure as Code security (Terraform, CloudFormation, etc.)
- **`all`** - Run all available scanners

**Default:** If not specified, runs `sast,sca`

### Scanner Examples

Run all scanners:
```yaml
- uses: CodeAnt-AI/[email protected]
with:
access_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
scanners: 'all'
```

Run specific scanners:
```yaml
- uses: CodeAnt-AI/[email protected]
with:
access_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
scanners: 'sast,secrets,iac'
```

## Setup

Expand Down
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: 'Scan timeout in seconds'
required: false
default: '300'
scanners:
description: 'Security scanners to run (sast, sca, secrets, antipatterns, iac, all)'
required: false
default: 'sast,sca'

runs:
using: 'composite'
Expand Down Expand Up @@ -59,6 +63,7 @@ runs:
INCLUDE_PATHS: ${{ inputs.include_paths }}
EXCLUDE_PATHS: ${{ inputs.exclude_paths }}
SCAN_TIMEOUT: ${{ inputs.scan_timeout }}
SCANNERS: ${{ inputs.scanners }}
run: |
bash start_scan.sh \
-a "$ACCESS_TOKEN" \
Expand All @@ -68,4 +73,5 @@ runs:
-s github \
-i "$INCLUDE_PATHS" \
-e "$EXCLUDE_PATHS" \
-t "$SCAN_TIMEOUT"
-t "$SCAN_TIMEOUT" \
--scanners "$SCANNERS"