-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
607 additions
and
375 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,22 +24,26 @@ env: | |
NODE_VERSION: 18.16.0 | ||
# https://github.com/helm/helm/releases | ||
HELM_VERSION: 3.11.2 | ||
# https://npmjs.com/package/snyk?activeTab=versions | ||
SNYK_VERSION: 1.1187.0 | ||
# https://github.com/oras-project/oras/releases | ||
ORAS_VERSION: 1.0.0 | ||
|
||
jobs: | ||
sast-creds: | ||
name: SAST - Credentials | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected].2 | ||
uses: actions/[email protected].3 | ||
with: | ||
# We need all Git history for testing credentials | ||
fetch-depth: 0 | ||
# Ensure all submodules up-to-date | ||
submodules: recursive | ||
|
||
- name: SAST - Credentials | ||
uses: trufflesecurity/trufflehog@v3.33.0 | ||
uses: trufflesecurity/trufflehog@v3.44.0 | ||
with: | ||
base: ${{ github.event.repository.default_branch }} | ||
head: HEAD | ||
|
@@ -53,7 +57,7 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected].2 | ||
uses: actions/[email protected].3 | ||
with: | ||
# We need all Git history for "version.sh" | ||
fetch-depth: 0 | ||
|
@@ -73,7 +77,7 @@ jobs: | |
|
||
# Required for running "npx" CLI | ||
- name: Setup Node | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@v3.7.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
|
@@ -112,20 +116,10 @@ jobs: | |
--severity-threshold=medium \ | ||
.helm-template | ||
# Fix issue "Error: Code Scanning could not process the submitted SARIF file: rejecting SARIF, as there are more runs than allowed (XX > 20)" | ||
# See: https://github.com/github/codeql-action/issues/220 | ||
- name: Merge SARIF files | ||
run: | | ||
npx --yes @microsoft/sarif-multitool@${{ env.SARIF_MULTITOOL_VERSION }} \ | ||
merge \ | ||
--merge-runs \ | ||
--output-file merged.sarif \ | ||
snyk.sarif | ||
- name: Upload results to GitHub Security | ||
uses: github/codeql-action/upload-sarif@v2.2.12 | ||
uses: github/codeql-action/upload-sarif@v2.20.3 | ||
with: | ||
sarif_file: merged.sarif | ||
sarif_file: snyk.sarif | ||
|
||
deploy-helm: | ||
name: Deploy Helm chart | ||
|
@@ -137,7 +131,7 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected].2 | ||
uses: actions/[email protected].3 | ||
with: | ||
# Chart Releaser needs to have local access to "gh-pages" plus current branch | ||
fetch-depth: 0 | ||
|
@@ -177,7 +171,7 @@ jobs: | |
src: [conversation-api, conversation-ui] | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected].2 | ||
uses: actions/[email protected].3 | ||
with: | ||
# We need all Git history for "version.sh" | ||
fetch-depth: 0 | ||
|
@@ -197,31 +191,31 @@ jobs: | |
- name: Setup QEMU | ||
id: setup-qemu | ||
uses: docker/setup-qemu-action@v2.1.0 | ||
uses: docker/setup-qemu-action@v2.2.0 | ||
with: | ||
platforms: ${{ env.CONTAINER_PLATFORMS }} | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2.5.0 | ||
uses: docker/setup-buildx-action@v2.9.1 | ||
with: | ||
version: v${{ env.BUILDX_VERSION }} | ||
|
||
# Required for running "npx" CLI | ||
- name: Setup Node | ||
uses: actions/setup-node@v3.6.0 | ||
uses: actions/setup-node@v3.7.0 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Login to container registry | ||
uses: docker/login-action@v2.1.0 | ||
uses: docker/login-action@v2.2.0 | ||
with: | ||
registry: ${{ env.CONTAINER_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Container meta | ||
id: meta | ||
uses: docker/metadata-action@v4.4.0 | ||
uses: docker/metadata-action@v4.6.0 | ||
with: | ||
images: ${{ env.CONTAINER_REGISTRY }}/${{ env.CONTAINER_NAME }}/${{ matrix.src }} | ||
tags: | | ||
|
@@ -244,7 +238,7 @@ jobs: | |
echo "tag=$tag" >> $GITHUB_OUTPUT | ||
- name: Build/push container | ||
uses: docker/build-push-action@v4.0.0 | ||
uses: docker/build-push-action@v4.1.1 | ||
with: | ||
build-args: | | ||
VERSION=${{ steps.version.outputs.version_full }} | ||
|
@@ -275,20 +269,10 @@ jobs: | |
--severity-threshold=medium \ | ||
${{ steps.tag.outputs.tag }} | ||
# Fix issue "Error: Code Scanning could not process the submitted SARIF file: rejecting SARIF, as there are more runs than allowed (XX > 20)" | ||
# See: https://github.com/github/codeql-action/issues/220 | ||
- name: Merge SARIF files | ||
run: | | ||
npx --yes @microsoft/sarif-multitool@${{ env.SARIF_MULTITOOL_VERSION }} \ | ||
merge \ | ||
--merge-runs \ | ||
--output-file merged.sarif \ | ||
snyk.sarif | ||
- name: Upload results to GitHub Security | ||
uses: github/codeql-action/upload-sarif@v2.2.12 | ||
uses: github/codeql-action/upload-sarif@v2.20.3 | ||
with: | ||
sarif_file: merged.sarif | ||
sarif_file: snyk.sarif | ||
|
||
sast-semgrep: | ||
name: SAST - Semgrep | ||
|
@@ -300,7 +284,7 @@ jobs: | |
image: returntocorp/semgrep | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected].2 | ||
uses: actions/[email protected].3 | ||
|
||
- name: Run tests | ||
# Semgrep can be used to break the build when it detects security issues. In this case we want to upload the issues to GitHub Security | ||
|
@@ -310,6 +294,34 @@ jobs: | |
run: semgrep ci --sarif --output=semgrep.sarif | ||
|
||
- name: Upload results to GitHub Security | ||
uses: github/codeql-action/upload-sarif@v2.2.12 | ||
uses: github/codeql-action/upload-sarif@v2.20.3 | ||
with: | ||
sarif_file: semgrep.sarif | ||
|
||
deploy-artifacthub-metadata: | ||
name: Deploy ArtifactHub metadata | ||
# Only deploy on main branch, as we don't want to break verification with a bad metadata file during development | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Setup ORAS | ||
uses: oras-project/[email protected] | ||
with: | ||
version: ${{ env.ORAS_VERSION }} | ||
|
||
- name: Login to registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ${{ env.CONTAINER_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push to registry | ||
run: | | ||
oras push \ | ||
${{ env.CONTAINER_REGISTRY }}/${{ env.CONTAINER_NAME }}:artifacthub.io \ | ||
artifacthub-repo.yml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml \ | ||
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml |
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,83 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our community include: | ||
|
||
- Demonstrating empathy and kindness toward other people | ||
- Being respectful of differing opinions, viewpoints, and experiences | ||
- Giving and gracefully accepting constructive feedback | ||
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience | ||
- Focusing on what is best not just for us as individuals, but for the overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
- The use of sexualized language or imagery, and sexual attention or advances of any kind | ||
- Trolling, insulting or derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or email address, without their explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [Clémence Lesné](mailto:[email protected]). All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. | ||
|
||
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations]. | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html | ||
[Mozilla CoC]: https://github.com/mozilla/diversity | ||
[FAQ]: https://www.contributor-covenant.org/faq | ||
[translations]: https://www.contributor-covenant.org/translations |
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,21 @@ | ||
# Security Policy | ||
|
||
## Proactive detection of vulnerabilities | ||
|
||
At each build, a vulnerability scan is performed on the system. If a vulnerability that can be upgraded is detected, the build is stopped and the image is not pushed to the registry. Vulnerability is reported in [GitHub Security](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning). The maintainers are alterted and have access to reports. | ||
|
||
Automation is supported by [Snyk](https://snyk.io) and [Semgrep](https://semgrep.dev). Helm chart, configuration files, and containers, are scanned for vulnerabilities and misconfigurations. | ||
|
||
## Reporting a vulnerability | ||
|
||
If you think you have found a vulnerability, please do not open an issue on GitHub. Instead, please send an email to [Clémence Lesné](mailto:[email protected]). | ||
|
||
## Chain of trust | ||
|
||
Helm chart and containers are not signed yet with a GPG key. | ||
|
||
## Reliability notes | ||
|
||
Systems are built every days. Each image is accompanied by a SBOM (Software Bill of Materials) which allows to verify that the installed packages are those expected. This speed has the advantage of minimizing exposure to security flaws, which will then be corrected on the build environments in 24 hours. | ||
|
||
Nevertheless it can happen that a package provider (e.g. Debian, Canonical, Red Hat) deploys a system update that introduces a bug. This is difficult to predict. |
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,4 @@ | ||
repositoryID: 06ff1e13-8ff5-42a2-b081-0d647a731827 | ||
owners: | ||
- name: clemlesne | ||
email: [email protected] |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.