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
4 changes: 2 additions & 2 deletions .github/workflows/tfsec-evidence-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4
with:
sparse-checkout: |
examples/tfsec/**
examples/aquasecurity/tfsec/**
sparse-checkout-cone-mode: false
- name: Publish to JFrog Artifactory
run: |
Expand All @@ -48,7 +48,7 @@ jobs:
run: |
pwd
ls -al
python ./examples/tfsec/tfsec_json_to_markdown_helper.py tfsec.json
python ./examples/aquasecurity/tfsec/tfsec_json_to_markdown_helper.py tfsec.json

# Attaching the evidence to associated package
- name: Attach evidence using jfrog cli
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/trivy-evidence-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4
- name: Build and publish Docker Image to Artifactory
run: |
docker build . --file ./examples/trivy/Dockerfile --tag $REGISTRY_DOMAIN/$REPO_NAME/$IMAGE_NAME:$VERSION
docker build . --file ./examples/aquasecurity/trivy/Dockerfile --tag $REGISTRY_DOMAIN/$REPO_NAME/$IMAGE_NAME:$VERSION
echo "Pushing Docker Image to Artifactory"
jf rt docker-push $REGISTRY_DOMAIN/$REPO_NAME/$IMAGE_NAME:$VERSION $REPO_NAME --build-name=$BUILD_NAME --build-number=${{ github.run_number }}
echo "Pushing Docker Image to Artifactory completed"
Expand All @@ -48,7 +48,8 @@ jobs:
- name: Generate optional custom markdown report
if: env.ATTACH_OPTIONAL_CUSTOM_MARKDOWN_TO_EVIDENCE == 'true'
run: |
python ./examples/trivy/trivy_json_to_markdown_helper.py trivy-results.json
cat trivy-results.json
python ./examples/aquasecurity/trivy/trivy_json_to_markdown_helper.py trivy-results.json

# Attaching the evidence to associated package
- name: Attach evidence using jfrog cli
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ You can trigger the workflow manually from the GitHub Actions tab. The workflow
## Key Commands Used

- **Publish Terraform Package:**
The workflow begins by configuring the JFrog CLI for Terraform and then publishes the code in the `examples/tfsec` directory as a versioned module to your Artifactory instance. It concludes by publishing the associated build information.
The workflow begins by configuring the JFrog CLI for Terraform and then publishes the code in the `examples/aquasecurity/tfsec` directory as a versioned module to your Artifactory instance. It concludes by publishing the associated build information.

```bash
jf tfc --repo-deploy tf-local \
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Once the workflow completes successfully, you can navigate to your repository in
* **Build Docker Image:**

```
docker build . --file ./examples/trivy-verify-example/Dockerfile --tag $REGISTRY_URL/$REPO_NAME/$IMAGE_NAME:$VERSION
docker build . --file ./examples/aquasecurity/trivy-verify-example/Dockerfile --tag $REGISTRY_URL/$REPO_NAME/$IMAGE_NAME:$VERSION
```

* **Run Trivy Scan:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def generate_markdown_report(trivy_output):
"""

for result in trivy_output['Results']:
# Skip if Results key does not have a "Vulnerabilities" key or if Vulnerabilities is empty
if 'Vulnerabilities' not in result or not result['Vulnerabilities']:
continue

package_class = result['Class']
target = result['Target']

Expand Down