-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add opslevel_check_code_issue (#523)
* add opslevel_check_code_issue * update opslevel_modules submodule hash * WIP: update tests and CodeIssue update logic * better tests, updated per downstream updates * PR feedback * add example for opslevel_check_code_issue
- Loading branch information
1 parent
61a1c05
commit b25d4fc
Showing
11 changed files
with
1,398 additions
and
34 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
kind: Feature | ||
body: Add new resource to manage Code Issue Checks - 'opslevel_check_code_issue' | ||
time: 2024-10-22T16:15:48.980301-05:00 |
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 @@ | ||
terraform import opslevel_check_code_issue.example Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS82MDI0 |
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,59 @@ | ||
data "opslevel_rubric_category" "security" { | ||
filter { | ||
field = "name" | ||
value = "Security" | ||
} | ||
} | ||
|
||
data "opslevel_rubric_level" "bronze" { | ||
filter { | ||
field = "name" | ||
value = "Bronze" | ||
} | ||
} | ||
|
||
data "opslevel_team" "devs" { | ||
alias = "developers" | ||
} | ||
|
||
data "opslevel_filter" "tier1" { | ||
filter { | ||
field = "name" | ||
value = "Tier 1" | ||
} | ||
} | ||
|
||
resource "opslevel_check_code_issue" "example" { | ||
name = "foo" | ||
pass_pending = true | ||
enabled = true | ||
# To set a future enable date remove field 'enabled' and use 'enable_on' | ||
# enable_on = "2022-05-23T14:14:18.782000Z" | ||
category = data.opslevel_rubric_category.security.id | ||
level = data.opslevel_rubric_level.bronze.id | ||
owner = data.opslevel_team.devs.id | ||
filter = data.opslevel_filter.tier1.id | ||
notes = "Optional additional info on why this check is run or how to fix it" | ||
|
||
constraint = "any" | ||
issue_name = "CVE-2024-0001" | ||
issue_type = [ | ||
"snyk:code", | ||
"snyk:cloud", | ||
"snyk:config", | ||
"snyk:custom", | ||
"snyk:license", | ||
"snyk:package_vulnerability", | ||
] | ||
max_allowed = 5 | ||
resolution_time = { | ||
unit = "day" | ||
value = 3 | ||
} | ||
severity = [ | ||
"snyk:critical", | ||
"snyk:low", | ||
"snyk:medium", | ||
"snyk:high", | ||
] | ||
} |
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.