-
Notifications
You must be signed in to change notification settings - Fork 532
doc: Added enhancements to security doc #5203
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,20 +1,112 @@ | ||
# Security Features | ||
|
||
{% hint style="info" %} | ||
### Prerequisite | ||
## Introduction | ||
|
||
Install any one of the following integrations for scanning vulnerabilities: | ||
* [Clair](../user-guide/integrations/clair.md) | ||
* Trivy | ||
{% endhint %} | ||
Devtron provides [DevSecOps](https://devtron.ai/product/devsecops) capabilities across your software development life cycle for both: the default CI/CD solution by Devtron as well as your existing CI/CD Tools. | ||
|
||
One of the key components of DevSecOps is the detection of security risks. Currently, Devtron supports the following types of scanning: | ||
|
||
* Image Scan | ||
* Code Scan (not available for Helm apps) | ||
* Kubernetes Manifest Scan | ||
|
||
 | ||
|
||
You can integrate a scanning tool of your choice. By default, Devtron integrates with Trivy using which you can scan for the following issues: | ||
|
||
* Vulnerability | ||
* License Risks | ||
* Misconfigurations | ||
* Exposed Secrets | ||
|
||
--- | ||
|
||
## Where to Initiate the Scan | ||
|
||
### After Code Commit | ||
ashokdevtron marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
When you commit the code, it's essential to scan it before building a [container image](../reference/glossary.md#image). By scanning early, you can catch and fix problems before they become expensive or time-consuming to remediate later. | ||
|
||
 | ||
|
||
1. In your application, go to **App Configuration** → **Workflow Editor**. | ||
|
||
2. Click the CI pipeline of your preferred workflow. | ||
|
||
3. Go to the **Pre-build stage** (tab). | ||
|
||
4. Click **+ Add Task**. | ||
|
||
5. Choose **Vulnerability_Scanner v1.0.0** plugin from the list. | ||
|
||
6. Click **Update Pipeline**. | ||
|
||
Based on the results of the scanner, you can also decide whether your CI should proceed further or not. This is possible through **Pass/Failure Condition** setting in the plugin. In the below example, we are allowing image build only if the no. of high vulnerability is zero. | ||
|
||
 | ||
|
||
Results of Pre-CI scan will be visible under `Code Scan` in the **App Details** page as shown below. | ||
|
||
 | ||
|
||
### After Building Container Image | ||
|
||
Once a container image is ready, you can scan its base image libraries, stale files, compromised licenses, and many more. | ||
|
||
There are 2 options available: | ||
* Image scan in the Build stage (refer [Security Scans](./security-features/security-scans.md)) | ||
* Comprehensive scan in Post-Build stage | ||
|
||
Devtron's security feature consists of two primary components: | ||
This section contains the steps for comprehensive scan. | ||
|
||
1. [Security Scans](./security-features/security-scans.md) - This allows you to identify and address potential security risks effectively. By leveraging this feature, you can ensure that your containerized applications are safeguarded against known vulnerabilities. | ||
 | ||
|
||
2. [Security Policies](./security-features/security-policies.md) - This allows you to define policies to block or allow the deployment of container images depending on the vulnerabilities detected. | ||
1. Go to the **Post-build stage** (tab) of your CI pipeline. | ||
|
||
2. Click **+ Add Task** and choose **Vulnerability_Scanner v1.0.0**. | ||
|
||
3. Click **Update Pipeline**. | ||
|
||
Results of Post-CI scan will be visible under `Image Scan` in the **App Details** page as shown below. | ||
|
||
 | ||
|
||
### Before Triggering Deployment | ||
|
||
There can be a loophole where the original image built in the CI stage gets compromised later (say, in publicly accessible repository). Therefore, you can scan the image and catch issues before deploying it. On top of that, you can also scan manifests to detect misconfigurations and exposed secrets. | ||
|
||
 | ||
|
||
1. Go to the **Pre-Deployment stage** (tab) of your CD pipeline. | ||
|
||
2. Click **+ Add Task** and choose **Vulnerability_Scanner v1.0.0**. | ||
|
||
3. Click **Update Pipeline**. | ||
|
||
Results of Pre-CD scan will be visible under `Image Scan` and `Kubernetes Manifest` in the **App Details** page as shown below. | ||
|
||
 | ||
|
||
### During Helm App Deployment | ||
|
||
When you [deploy a helm chart](../user-guide/deploy-chart/deployment-of-charts.md), Devtron will scan the image associated with that helm chart and also the manifests, but unlike Devtron Apps, there is no code scan involved. | ||
|
||
Results of helm app scan will be visible under `Image Scan` and `Kubernetes Manifest` in the **App Details** page as shown below. | ||
ashokdevtron marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
|
||
--- | ||
|
||
## Scans and Policies | ||
|
||
{% hint style="warning" %} | ||
### Who Can Perform This Action? | ||
Users need to have super-admin permission to enable vulnerability scanning and to define security policies in Devtron. | ||
{% endhint %} | ||
{% endhint %} | ||
|
||
Devtron's Security feature has two primary sections: | ||
|
||
1. [**Security Scans**](./security-features/security-scans.md) - You can view the vulnerabilities detected across your applications. | ||
|
||
2. [**Security Policies**](./security-features/security-policies.md) - This allows you to define guardrails to block or allow the deployment of container images depending on the vulnerabilities detected. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.