Adding a action to merge multiple SARIF files into one. Also contains a test and example files. Reviewed-on: t.behrendt/trivy-actions#37 Reviewed-by: branch-buddy <branch-buddy@t00n.de> Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #37.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Merge SARIF Files Action
|
||||
|
||||
A reusable Gitea Action that merges multiple SARIF files into a single SARIF file.
|
||||
|
||||
**Note:** This action only merges the files. It doesn't perform any validation, filtering, or deduplication.
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```yaml
|
||||
- name: Merge SARIF Files
|
||||
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/merge-sarif-files@0.0.1
|
||||
with:
|
||||
files: |
|
||||
- test_sarif1.json
|
||||
- test_sarif2.json
|
||||
output-file: merged.sarif
|
||||
```
|
||||
|
||||
### Complete Example
|
||||
|
||||
```yaml
|
||||
name: Merge SARIF Files
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
merge-sarif-files:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Merge SARIF Files
|
||||
uses: https://gitea.t000-n.de/t.behrendt/trivy-actions/merge-sarif-files@0.0.1
|
||||
with:
|
||||
files: |
|
||||
- test_sarif1.json
|
||||
- test_sarif2.json
|
||||
output-file: merged.sarif
|
||||
```
|
||||
|
||||
## Inputs
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
| ------------- | ----------------------------- | -------- | -------------- |
|
||||
| `files` | Paths to SARIF files to merge | Yes | |
|
||||
| `output-file` | Output file path | Yes | `merged.sarif` |
|
||||
Reference in New Issue
Block a user