-
-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into krishna/openai_assistant
- Loading branch information
Showing
155 changed files
with
12,976 additions
and
4,781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# | ||
# This workflow file requires a free account on Bearer.com to manage findings, notifications and more. | ||
# See https://docs.bearer.com/guides/bearer-cloud/ | ||
name: Bearer | ||
|
||
on: | ||
push: | ||
branches: ["master" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["master"] | ||
schedule: | ||
- cron: '24 22 * * 6' | ||
|
||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
|
||
jobs: | ||
bearer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout project source | ||
- uses: actions/checkout@v4 | ||
# Scan code using Bearer CLI | ||
- name: Run Report | ||
id: report | ||
uses: bearer/bearer-action@828eeb928ce2f4a7ca5ed57fb8b59508cb8c79bc | ||
with: | ||
api-key: ${{ secrets.BEARER_TOKEN }} | ||
format: sarif | ||
output: results.sarif | ||
exit-code: 0 | ||
# Upload SARIF file generated in previous step | ||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Dependency Review Action | ||
# | ||
# This Action will scan dependency manifest files that change as part of a Pull Request, | ||
# surfacing known-vulnerable versions of the packages declared or updated in the PR. | ||
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable | ||
# packages will be blocked from merging. | ||
# | ||
# Source repository: https://github.com/actions/dependency-review-action | ||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement | ||
name: 'Dependency review' | ||
on: | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
# If using a dependency submission action in this workflow this permission will need to be set to: | ||
# | ||
# permissions: | ||
# contents: write | ||
# | ||
# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api | ||
permissions: | ||
contents: read | ||
# Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option | ||
pull-requests: write | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout repository' | ||
uses: actions/checkout@v4 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v4 | ||
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options. | ||
with: | ||
comment-summary-in-pr: always | ||
# fail-on-severity: moderate | ||
# deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later | ||
# retry-on-snapshot-warnings: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow integrates Pyre with GitHub's | ||
# Code Scanning feature. | ||
# | ||
# Pyre is a performant type checker for Python compliant with | ||
# PEP 484. Pyre can analyze codebases with millions of lines | ||
# of code incrementally – providing instantaneous feedback | ||
# to developers as they write code. | ||
# | ||
# See https://pyre-check.org | ||
|
||
name: Pyre | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pyre: | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Run Pyre | ||
uses: facebook/pyre-action@60697a7858f7cc8470d8cc494a3cf2ad6b06560d | ||
with: | ||
# To customize these inputs: | ||
# See https://github.com/facebook/pyre-action#inputs | ||
repo-directory: './' | ||
requirements-path: 'requirements.txt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow integrates Python Static Analyzer (Pysa) with | ||
# GitHub's Code Scanning feature. | ||
# | ||
# Python Static Analyzer (Pysa) is a security-focused static | ||
# analysis tool that tracks flows of data from where they | ||
# originate to where they terminate in a dangerous location. | ||
# | ||
# See https://pyre-check.org/docs/pysa-basics/ | ||
|
||
name: Pysa | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '43 5 * * 3' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pysa: | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Run Pysa | ||
uses: facebook/pysa-action@f46a63777e59268613bd6e2ff4e29f144ca9e88b | ||
with: | ||
# To customize these inputs: | ||
# See https://github.com/facebook/pysa-action#inputs | ||
repo-directory: './' | ||
requirements-path: 'requirements.txt' | ||
infer-types: true | ||
include-default-sapp-filters: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Python Package using Conda | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: | | ||
conda env update --file environment.yml --name base | ||
- name: Lint with flake8 | ||
run: | | ||
conda install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
conda install pytest | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow file requires a free account on Semgrep.dev to | ||
# manage rules, file ignores, notifications, and more. | ||
# | ||
# See https://semgrep.dev/docs | ||
|
||
name: Semgrep | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '19 7 * * 3' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
semgrep: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
name: Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout project source | ||
- uses: actions/checkout@v4 | ||
|
||
# Scan code using project's configuration on https://semgrep.dev/manage | ||
- uses: returntocorp/semgrep-action@fcd5ab7459e8d91cb1777481980d1b18b4fc6735 | ||
with: | ||
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
publishDeployment: ${{ secrets.SEMGREP_DEPLOYMENT_ID }} | ||
generateSarif: "1" | ||
|
||
# Upload SARIF file generated in previous step | ||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: semgrep.sarif | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: trivy | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '31 0 * * 5' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
name: Build | ||
runs-on: "ubuntu-20.04" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build an image from Dockerfile | ||
run: | | ||
docker build -t docker.io/my-organization/my-app:${{ github.sha }} . | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe | ||
with: | ||
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}' | ||
format: 'template' | ||
template: '@/contrib/sarif.tpl' | ||
output: 'trivy-results.sarif' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'trivy-results.sarif' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.