Skip to content

Commit

Permalink
Merge pull request #17 from GeorgeDavis-Ibexlabs/dev
Browse files Browse the repository at this point in the history
Merge changes in `dev` to `main`
  • Loading branch information
GeorgeDavis-Ibexlabs authored Sep 11, 2024
2 parents a257ff5 + 54ec951 commit 9323b9a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ jobs:
- name: Update Docker Hub description
uses: peter-evans/dockerhub-description@v4.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: georgedavisibexlabs/publish-sarif-to-jira
short-description: Publish SARIF data to JIRA
readme-filepath: ./DOCKER.md
enable-url-completion: true
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: georgedavisibexlabs/publish-sarif-to-jira
short-description: Publish SARIF data to JIRA
readme-filepath: ./DOCKER.md
enable-url-completion: true

- name: Run Trivy Image scanner
uses: aquasecurity/trivy-action@0.24.0
with:
scan-type: 'image'
image-ref: 'georgedavisibexlabs/publish-sarif-to-jira'
image-ref: 'georgedavisibexlabs/publish-sarif-to-jira:main'
limit-severities-for-sarif: true
trivy-config: .github/config/trivy-sarif.yaml

Expand Down
10 changes: 6 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ def main():

sarif_tool_name, sarif_data = sarifObj.load_sarif_data(sarif_file_path=sarif_file_path)

logger.info("[" + sarif_tool_name + "]: Total no. of issues found in SARIF report - " + str(sarif_data.get_result_count()))
sarif_result_count = sarif_data.get_result_count()

if sarif_data.get_result_count() > 0:
logger.info("[" + sarif_tool_name + "]: Total no. of issues found in SARIF report - " + str(sarif_result_count))

if sarif_result_count == 0:
logger.error("[" + sarif_tool_name + "]: No results found.")

else:
sarif_findings = sarifObj.build_sarif_findings_dict(
sarif_tool_name=sarif_tool_name,
sarif_data=sarif_data
Expand Down Expand Up @@ -121,8 +125,6 @@ def main():
issue_desc = issue_desc,
issue_type = "Task"
)
else:
logger.error("[" + sarif_tool_name + "]: No results found.")

logger.info("Success.")

Expand Down

0 comments on commit 9323b9a

Please sign in to comment.