Skip to content

Commit

Permalink
Merge pull request #443 from linear-b/orca-reviewers
Browse files Browse the repository at this point in the history
Create review orca alerts automation
  • Loading branch information
BenLloydPearson committed Jan 30, 2024
2 parents 523678c + 1ee9ea6 commit 00b2d92
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 1 deletion.
45 changes: 45 additions & 0 deletions docs/automations/integrations/orca/review-orca-alerts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Automation - Review Orca Security Alerts
description: Automatically require review from your SecOps team for Orca Security violations in pull requests.
---
# Require Security Review for Orca Alerts
<!-- --8<-- [start:example]-->
Automatically require review from your SecOps team for Orca Security violations in pull requests.

<div class="automationImage" markdown="1">
![Review Orca Security Alerts](/automations/integrations/orca/review-orca-alerts/review-orca-alerts-1-light.png#only-light)
![Review Orca Security Alerts](/automations/integrations/orca/review-orca-alerts/review-orca-alerts-2-light.png#only-light)
![Review Orca Security Alerts](/automations/integrations/orca/review-orca-alerts/review-orca-alerts-1-dark.png#only-dark)
![Review Orca Security Alerts](/automations/integrations/orca/review-orca-alerts/review-orca-alerts-2-dark.png#only-dark)

</div>
<div class="automationDescription" markdown="1">
!!! info "Configuration Description"
Conditions (all must be true):

* The PR contains a vulnerability, IAC problem, or secret that is flagged as High or Medium.

Automation Actions:

* Require review from your organization's security team.
* Post a comment explaining the requirement.

</div>
<div class="automationExample" markdown="1">
!!! example "Review Orca Security Alerts"
```yaml+jinja
--8<-- "docs/downloads/automation-library/integrations/orca/review_orca_alerts.cm"
```
<div class="result" markdown>
<span>
[:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/orca/review_orca_alerts.cm){ .md-button }
</span>
</div>
</div>
<!-- --8<-- [end:example]-->

## Additional Resources

--8<-- "docs/snippets/general.md"

--8<-- "docs/snippets/automation-footer.md"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- mode: yaml -*-

manifest:
version: 1.0
automations:
review_orca_alerts:
if:
- {{ has.vulnerability or has.iac_violation or has.secret }}
run:
- action: require-reviewers@v1
args:
reviewers: [my-organization/security-team]
- action: add-comment@v1
args:
comment: |
This PR requires additional review because it fails to meet Orca Security safe code standards.
orca: {{ pr | extractOrcaFindings }}

has:
vulnerability: {{ orca.vulnerabilities.priority == 'High' or orca.vulnerabilities.priority == 'Medium' }}
iac_violation: {{ orca.infrastructure_as_code.priority == 'High' or orca.infrastructure_as_code.priority == 'Medium' }}
secret: {{ orca.secrets.priority == 'High' or orca.secrets.priority == 'Medium' }}
4 changes: 3 additions & 1 deletion docs/integrations/orca-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ description: Implement workflow automations for Orca Security.
---
# Integrate gitStream with Orca Security

<a name="label-orca-scan-results"></a>
## Auto-Label Orca Security Scan Results
--8<-- "docs/automations/integrations/orca/label-orca-scan-results/README.md:example"

## Require Security Review for Orca Violations
--8<-- "docs/automations/integrations/orca/review-orca-alerts/README.md:example"



## Additional Resources
Expand Down

0 comments on commit 00b2d92

Please sign in to comment.