Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file modified images/create-policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion policies.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ A well-structured policy should include the following components:

4. **Vulnerability Types (CWEs)**: Choose which types of security vulnerabilities this policy should handle, based on your risk profile.

5. **Scope**: Select which projects to apply this policy to, allowing for environment-specific policies.
5. **Projects**: Select which projects to apply this policy to, allowing for environment-specific policies.

6. **Instruction Type**: Choose how your policy instructions interact with Corgea's built-in policies:
- **Append to Corgea Default Policy**: Adds your policy instructions to Corgea's built-in policies, preserving both sets of rules. Use this when you want to enhance the default policies with your specific business context, security controls, or environmental details.
- **Replace Corgea Default Policy**: Your policy instructions completely override Corgea's default behavior. Use this when you want full control over how specific scenarios are handled.

## Policy Best Practices

Expand Down Expand Up @@ -284,6 +288,19 @@ policies:
## Advanced configuration for corgea.yaml
Optionally, you can add these fields

- `instruction_type` : Determines how your policy instructions interact with Corgea's built-in policies. Can be set to `"append"` or `"overwrite"`. When set to `"append"`, your policy instructions are added to Corgea's built-in policies, preserving both sets of rules. When set to `"overwrite"` (default), your policy instructions completely replace Corgea's default behavior.

```
policies:
- type: "fix"
instruction_type: "append"
description: >
Additionally, ensure all fixes integrate with our custom SecureMiddleware framework
and follow our internal security guidelines for key rotation.
cwes:
- "CWE-79" # XSS
```

- `cwes` : Only applicable to "fix", or "false_positive". It can apply specific policy to specific cwes.
As an example,
```
Expand Down