Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
42b4ad1
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
55b2c66
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
74ec394
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
23a99e8
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
dc0351a
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
15b1baa
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
544323f
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
fffd101
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
d149eb5
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
95fb265
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
f2c28b0
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
6b1c169
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
2c0449c
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
883e6ec
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
21500e8
Bump certifi from 2022.9.24 to 2022.12.7
dependabot[bot] Jan 12, 2023
4b8145a
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
b1a8367
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
4d2521c
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
8b5b3ed
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
bfbdbd4
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
56722d2
Create codeql.yml
BhavyaChaudhary26 Jan 12, 2023
d8a6a48
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
52d366c
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
67dbe74
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
5bd77b1
Update Dockerfile
BhavyaChaudhary26 Jan 12, 2023
62d0fd7
Update main.py
BhavyaChaudhary26 Jan 12, 2023
a03d22f
Update trivy_scanning.yml
BhavyaChaudhary26 Jan 12, 2023
78b6e38
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
123dfca
Update main.py
BhavyaChaudhary26 Jan 12, 2023
5dabdc3
Merge pull request #1 from BhavyaChaudhary26/dependabot/pip/certifi-2…
BhavyaChaudhary26 Jan 12, 2023
cc21c8e
Update sast.yml
BhavyaChaudhary26 Jan 12, 2023
5ec8077
Update secrets.yml
BhavyaChaudhary26 Jan 12, 2023
c5f6686
Update Dockerfile
BhavyaChaudhary26 Jan 12, 2023
5e74e57
Update main.py
BhavyaChaudhary26 Jan 12, 2023
b72c816
Merge pull request #2 from BhavyaChaudhary26/new-branch
BhavyaChaudhary26 Jan 12, 2023
4de3081
Create SECURITY.md
BhavyaChaudhary26 Mar 8, 2023
669ed5a
Merge pull request #4 from BhavyaChaudhary26/BhavyaChaudhary26-patch-1
BhavyaChaudhary26 Mar 8, 2023
4b90ff4
Create abctest
BhavyaChaudhary26 Jan 9, 2025
0210e42
Rename abctest to abctest.md
BhavyaChaudhary26 Jan 9, 2025
f64f7be
Update abctest.md
BhavyaChaudhary26 Jan 9, 2025
98b8ea3
update read me
BhavyaChaudhary26 Jan 14, 2026
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
76 changes: 76 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '30 21 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
50 changes: 26 additions & 24 deletions .github/workflows/sast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
push:
branches: ['main']
workflow_dispatch:
## Start: Version 3
#pull_request:
# types: [opened, reopened, synchronize]
## End: Version 3
# Start: Version 3
pull_request:
types: [opened, reopened, synchronize]
# End: Version 3

jobs:
scan:
Expand Down Expand Up @@ -37,25 +37,27 @@ jobs:



## Start: Version 2
#- name: Install dependencies
# shell: bash
# run: |
# pip install bandit-sarif-formatter bandit
# Start: Version 2
- name: Install dependencies
shell: bash
run: |
pip install bandit-sarif-formatter bandit



#- name: Bandit
# shell: bash
# run: |
# bandit -f sarif -o results.sarif -r --exit-zero .
- name: Bandit
shell: bash
run: |
bandit -f sarif -o results.sarif -r --exit-zero .

#- name: Upload artifact
# uses: actions/upload-artifact@main
# with:
# name: results.sarif
# path: results.sarif

#- name: Upload SARIF file
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: results.sarif
## End: Version 2
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: results.sarif
path: results.sarif

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
# End: Version 2
50 changes: 25 additions & 25 deletions .github/workflows/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ on:
push:
branches: ['main']
workflow_dispatch:
## Start: Version 3
#pull_request:
# types: [opened, reopened, synchronize]
## End: Version 3
# Start: Version 3
pull_request:
types: [opened, reopened, synchronize]
# End: Version 3

jobs:
scan:
runs-on: ubuntu-latest
steps:
## Start: Version 0
# Start: Version 0
- name: Checkout repository
uses: actions/checkout@v3
## End: Version 0
# End: Version 0



Expand All @@ -29,22 +29,22 @@ jobs:



## Start: Version 2
#- name: GitLeaks
# continue-on-error: true
# uses: gitleaks/gitleaks-action@v2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false

#- name: Upload artifact
# uses: actions/upload-artifact@main
# with:
# name: results.sarif
# path: results.sarif

#- name: Upload SARIF file
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: results.sarif
## End: Version 2
# Start: Version 2
- name: GitLeaks
continue-on-error: true
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false

- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: results.sarif
path: results.sarif

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
# End: Version 2
50 changes: 25 additions & 25 deletions .github/workflows/trivy_scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Container Scanning with Trivy
runs-on: ubuntu-20.04
steps:
## Start: Version 0
# Start: Version 0
- name: Checkout code
uses: actions/checkout@v3

Expand All @@ -23,7 +23,7 @@ jobs:
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
## End: Version 0
# End: Version 0



Expand All @@ -38,31 +38,31 @@ jobs:
# env:
# TRIVY_USERNAME: ${{ github.actor }}
# TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
## End: Version 1
# End: Version 1





## Start: Version 2
#- name: Trivy
# uses: aquasecurity/trivy-action@master
# with:
# image-ref: ${{ steps.meta.outputs.tags }}
# format: 'sarif'
# output: 'trivy-results.sarif'
# env:
# TRIVY_USERNAME: ${{ github.actor }}
# TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
#
#- name: Upload artifact
# uses: actions/upload-artifact@main
# with:
# name: 'trivy-results.sarif'
# path: 'trivy-results.sarif'
#
#- name: Upload Trivy scan results to GitHub Security tab
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: 'trivy-results.sarif'
## End: Version 2
# Start: Version 2
- name: Trivy
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ steps.meta.outputs.tags }}
format: 'sarif'
output: 'trivy-results.sarif'
env:
TRIVY_USERNAME: ${{ github.actor }}
TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: 'trivy-results.sarif'
path: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
# End: Version 2
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# Module 3: DevSecOps Example

This project demonstrates a basic example of how security can be integrated into development workflows.

---

## Scenario

You are a **DevOps Engineer**. Until now, the team you are working with has not implemented any security activities in their project.
As your project becomes more mature, the project manager decides it's time to step up and start securing the project.
Now, it's your job to introduce security activities into the project. You start with the following two DevOps phases:

- **Build**
- **Code**

---
# Module 3: DevSecOps Example
This project is a basic example on how integrate security can be integrated into development workflows.

## Scenario
Expand Down
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
3 changes: 3 additions & 0 deletions abctest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Disaster Recovery Exercise Summary
abc
**Date:** [20 August]
Loading