Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes in dev to main #17

Merged
merged 3 commits into from
Sep 11, 2024
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
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
Loading