-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
GH-109 add malicious_package attribute to security policy.
- Loading branch information
Showing
9 changed files
with
318 additions
and
37 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 |
---|---|---|
|
@@ -85,6 +85,38 @@ resource "xray_security_policy" "cvss_score" { | |
} | ||
} | ||
} | ||
resource "xray_security_policy" "malicious_package" { | ||
name = "test-security-policy-mal-pkg" | ||
description = "Security policy description" | ||
type = "security" | ||
project_key = "testproj" | ||
rule { | ||
name = "rule-name-mp" | ||
priority = 1 | ||
criteria { | ||
malicious_package = true | ||
} | ||
actions { | ||
webhooks = [] | ||
mails = ["[email protected]"] | ||
block_release_bundle_distribution = true | ||
fail_build = true | ||
notify_watch_recipients = true | ||
notify_deployer = true | ||
create_ticket_enabled = false // set to true only if Jira integration is enabled | ||
build_failure_grace_period_in_days = 5 // use only if fail_build is enabled | ||
block_download { | ||
unscanned = true | ||
active = true | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
|
@@ -127,7 +159,8 @@ Optional: | |
Optional: | ||
|
||
- `cvss_range` (Block List, Max: 1) The CVSS score range to apply to the rule. This is used for a fine-grained control, rather than using the predefined severities. The score range is based on CVSS v3 scoring, and CVSS v2 score is CVSS v3 score is not available. (see [below for nested schema](#nestedblock--rule--criteria--cvss_range)) | ||
- `fix_version_dependant` (Boolean) Default value is `false`. Issues that do not have a fixed version are not generated until a fixed version is available. | ||
- `fix_version_dependant` (Boolean) Default value is `false`. Issues that do not have a fixed version are not generated until a fixed version is available. Must be `false` with `malicious_package` enabled. | ||
- `malicious_package` (Boolean) Default value is `false`. Generating a violation on a malicious package. | ||
- `min_severity` (String) The minimum security vulnerability severity that will be impacted by the policy. | ||
|
||
<a id="nestedblock--rule--criteria--cvss_range"></a> | ||
|
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 |
---|---|---|
|
@@ -66,3 +66,35 @@ resource "xray_security_policy" "cvss_score" { | |
} | ||
} | ||
} | ||
|
||
resource "xray_security_policy" "malicious_package" { | ||
name = "test-security-policy-mal-pkg" | ||
description = "Security policy description" | ||
type = "security" | ||
project_key = "testproj" | ||
|
||
rule { | ||
name = "rule-name-mp" | ||
priority = 1 | ||
|
||
criteria { | ||
malicious_package = true | ||
} | ||
|
||
actions { | ||
webhooks = [] | ||
mails = ["[email protected]"] | ||
block_release_bundle_distribution = true | ||
fail_build = true | ||
notify_watch_recipients = true | ||
notify_deployer = true | ||
create_ticket_enabled = false // set to true only if Jira integration is enabled | ||
build_failure_grace_period_in_days = 5 // use only if fail_build is enabled | ||
|
||
block_download { | ||
unscanned = true | ||
active = 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
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
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.