-
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.
feat: add expiry field for Vulnerability Exceptions (#316)
* feat: add expiry time field to vulnerability exceptions * feat: add expiry time field to vulnerability exception host * fix: set expiry on host read * refactor: address code review comments Signed-off-by: Darren Murray <darren.murray@lacework.net>
- Loading branch information
1 parent
2fa4909
commit fb654c0
Showing
11 changed files
with
127 additions
and
21 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
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
26 changes: 26 additions & 0 deletions
26
lacework/resource_lacework_vulnerability_exception_container_test.go
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,26 @@ | ||
package lacework | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestVulnerabilityExceptionFixable(t *testing.T) { | ||
type fixableTests struct { | ||
description string | ||
input []int | ||
expected bool | ||
} | ||
|
||
for _, test := range []fixableTests{ | ||
{"fixable array is nil", nil, false}, | ||
{"fixable array is empty", []int{}, false}, | ||
{"fixable array has a true value", []int{1}, true}, | ||
{"fixable array has a false value", []int{0}, false}} { | ||
t.Run(test.description, func(t *testing.T) { | ||
result := vulnerabilityExceptionFixableEnabled(test.input) | ||
assert.Equal(t, test.expected, result) | ||
}) | ||
} | ||
} |
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
1 change: 1 addition & 0 deletions
1
vendor/github.com/lacework/go-sdk/api/cloud_accounts_aws_eks_audit.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 1 addition & 3 deletions
4
vendor/github.com/lacework/go-sdk/api/vulnerability_exceptions.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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