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

test #1

Merged
merged 2 commits into from
Jul 26, 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
73 changes: 73 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build-Scan-Push-Image-scan

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
BuildNumber: ${{ github.run_id }}-${{ github.run_number }}
ImageName: 'manasiprabhavalkar/python-flask'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Build Docker image
uses: docker/[email protected]
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ secrets.DockerHubUser }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.DockerHubPassword }}
# Docker repository to tag the image with
repository: ${{ env.ImageName }}
# Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
tags: 'github-${{ env.BuildNumber }}'
# Path to the Dockerfile (Default is '{path}/Dockerfile')
dockerfile: 'Dockerfile'
# Whether to push the image
push: false

#- name: Trivy Scan
# uses: aquasecurity/trivy-action@master
# with:
# # image reference
# image-ref: ${{ env.ImageName }}:github-${{ env.BuildNumber }}
# # Type of vulnerabilities
# vuln-type: 'os,library'
# format: 'sarif'
# output: 'trivy-results.sarif'
# exit-code: 1

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivyPremiumVuln.sarif'

#- name: Push Docker image
# uses: docker/[email protected]
# with:
# # Username used to log in to a Docker registry. If not set then no login will occur
# username: ${{ secrets.DockerHubUser }}
# # Password or personal access token used to log in to a Docker registry. If not set then no login will occur
# password: ${{ secrets.DockerHubPassword }}
# # Docker repository to tag the image with
# repository: ${{ env.ImageName }}
# # Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
# tags: 'github-${{ env.BuildNumber }}'
# # Path to the Dockerfile (Default is '{path}/Dockerfile')
# dockerfile: 'Dockerfile'
# # Whether to push the image
# push: true
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/saibehara.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38,238 changes: 0 additions & 38,238 deletions trivyExploitable.sarif

This file was deleted.

48,925 changes: 48,925 additions & 0 deletions trivyPremiumVuln.sarif

Large diffs are not rendered by default.

Loading