-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduced
dynatrace_appsec_vulnerability_settings
resource
- Loading branch information
1 parent
abad25b
commit ecf689b
Showing
13 changed files
with
603 additions
and
0 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
224 changes: 224 additions & 0 deletions
224
dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/schema.json
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,224 @@ | ||
{ | ||
"allowedScopes": [ | ||
"environment" | ||
], | ||
"description": "Automated [Runtime Vulnerability Analytics](https://dt-url.net/c010iio) helps you quickly and completely understand each detected vulnerability in your environment and how to remediate it, allowing you to prioritize which vulnerabilities to fix first. Note: Enabling Third-party or Code-level Vulnerability Analytics consumes Application Security units. For details, see the [Application Security Monitoring documentation](https://dt-url.net/wq031ql).", | ||
"displayName": "Vulnerability Analytics: General settings", | ||
"documentation": "", | ||
"dynatrace": "1", | ||
"enums": { | ||
"MonitoringMode": { | ||
"description": "", | ||
"displayName": "MonitoringMode", | ||
"documentation": "", | ||
"items": [ | ||
{ | ||
"description": "Code-level vulnerabilities will be ignored ", | ||
"displayName": "Do not monitor", | ||
"value": "MONITORING_OFF" | ||
}, | ||
{ | ||
"description": "Code-level vulnerabilities will be recorded", | ||
"displayName": "Monitor", | ||
"value": "MONITORING_ON" | ||
} | ||
], | ||
"type": "enum" | ||
} | ||
}, | ||
"maxObjects": 1, | ||
"multiObject": false, | ||
"properties": { | ||
"enableCodeLevelVulnerabilityDetection": { | ||
"default": false, | ||
"description": "", | ||
"displayName": "Enable Code-level Vulnerability Analytics", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
}, | ||
"enableRuntimeVulnerabilityDetection": { | ||
"default": false, | ||
"description": "", | ||
"displayName": "Enable Third-party Vulnerability Analytics", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
}, | ||
"globalMonitoringModeJava": { | ||
"default": "MONITORING_ON", | ||
"description": "Global Java code-level vulnerability detection control defines the default for all process groups. You can use monitoring rules to override the default for certain process groups.", | ||
"displayName": "Global Java code-level vulnerability detection control", | ||
"documentation": "Code-level vulnerability detection for Java has been recently released as early access version. It has been designed to carry a production-ready performance footprint. The overhead is depending on your application, but should be negligible in most cases. You have to enable the OneAgent feature \"Java code-level vulnerability evaluation\" to get started.", | ||
"maxObjects": 1, | ||
"metadata": { | ||
"sortItems": "disabled" | ||
}, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": { | ||
"$ref": "#/enums/MonitoringMode" | ||
} | ||
}, | ||
"technologies": { | ||
"description": "Vulnerability Analytics can be enabled/disabled per supported technology.", | ||
"displayName": "Technologies", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": { | ||
"$ref": "#/types/Technology" | ||
} | ||
} | ||
}, | ||
"schemaGroups": [ | ||
"group:appsec.vulnerability-analytics", | ||
"group:appsec" | ||
], | ||
"schemaId": "builtin:appsec.runtime-vulnerability-detection", | ||
"types": { | ||
"Technology": { | ||
"description": "", | ||
"displayName": "Technology", | ||
"documentation": "", | ||
"properties": { | ||
"enableDotNet": { | ||
"default": true, | ||
"description": "", | ||
"displayName": ".NET", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
}, | ||
"enableDotNetRuntime": { | ||
"default": true, | ||
"description": "", | ||
"displayName": ".NET runtimes", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"precondition": { | ||
"expectedValue": true, | ||
"property": "enableDotNet", | ||
"type": "EQUALS" | ||
}, | ||
"type": "boolean" | ||
}, | ||
"enableGo": { | ||
"default": true, | ||
"description": "", | ||
"displayName": "Go", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
}, | ||
"enableJava": { | ||
"default": true, | ||
"description": "", | ||
"displayName": "Java", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
}, | ||
"enableJavaRuntime": { | ||
"default": true, | ||
"description": "", | ||
"displayName": "Java runtimes", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"precondition": { | ||
"expectedValue": true, | ||
"property": "enableJava", | ||
"type": "EQUALS" | ||
}, | ||
"type": "boolean" | ||
}, | ||
"enableKubernetes": { | ||
"default": true, | ||
"description": "", | ||
"displayName": "Kubernetes", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
}, | ||
"enableNodeJs": { | ||
"default": true, | ||
"description": "", | ||
"displayName": "Node.js", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
}, | ||
"enableNodeJsRuntime": { | ||
"default": true, | ||
"description": "", | ||
"displayName": "Node.js runtimes", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"precondition": { | ||
"expectedValue": true, | ||
"property": "enableNodeJs", | ||
"type": "EQUALS" | ||
}, | ||
"type": "boolean" | ||
}, | ||
"enablePhp": { | ||
"default": true, | ||
"description": "", | ||
"displayName": "PHP", | ||
"documentation": "", | ||
"maxObjects": 1, | ||
"modificationPolicy": "DEFAULT", | ||
"nullable": false, | ||
"type": "boolean" | ||
} | ||
}, | ||
"summaryPattern": "", | ||
"type": "object", | ||
"version": "0", | ||
"versionInfo": "" | ||
} | ||
}, | ||
"uiCustomization": { | ||
"tabs": { | ||
"groups": [ | ||
{ | ||
"displayName": "Third-party Vulnerability Analytics", | ||
"properties": [ | ||
"enableRuntimeVulnerabilityDetection", | ||
"technologies" | ||
] | ||
}, | ||
{ | ||
"displayName": "Code-level Vulnerability Analytics", | ||
"properties": [ | ||
"enableCodeLevelVulnerabilityDetection", | ||
"globalMonitoringModeJava", | ||
"globalMonitoringModeDotNet" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"version": "3.0.1" | ||
} |
31 changes: 31 additions & 0 deletions
31
dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/service.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,31 @@ | ||
/** | ||
* @license | ||
* Copyright 2020 Dynatrace LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package runtimevulnerabilitydetection | ||
|
||
import ( | ||
runtimevulnerabilitydetection "github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/settings" | ||
"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/settings" | ||
"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/settings/services/settings20" | ||
) | ||
|
||
const SchemaVersion = "3.0.1" | ||
const SchemaID = "builtin:appsec.runtime-vulnerability-detection" | ||
|
||
func Service(credentials *settings.Credentials) settings.CRUDService[*runtimevulnerabilitydetection.Settings] { | ||
return settings20.Service[*runtimevulnerabilitydetection.Settings](credentials, SchemaID, SchemaVersion) | ||
} |
33 changes: 33 additions & 0 deletions
33
dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/service_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,33 @@ | ||
/** | ||
* @license | ||
* Copyright 2020 Dynatrace LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package runtimevulnerabilitydetection_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/api/builtin/appsec/runtimevulnerabilitydetection" | ||
"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/testing/api" | ||
) | ||
|
||
func TestAppSecVulnerabilitySettings(t *testing.T) { | ||
api.TestService(t, runtimevulnerabilitydetection.Service) | ||
} | ||
|
||
func TestAccAppSecVulnerabilitySettings(t *testing.T) { | ||
api.TestAcc(t) | ||
} |
28 changes: 28 additions & 0 deletions
28
dynatrace/api/builtin/appsec/runtimevulnerabilitydetection/settings/enums.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,28 @@ | ||
/** | ||
* @license | ||
* Copyright 2020 Dynatrace LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package runtimevulnerabilitydetection | ||
|
||
type MonitoringMode string | ||
|
||
var MonitoringModes = struct { | ||
MonitoringOff MonitoringMode | ||
MonitoringOn MonitoringMode | ||
}{ | ||
"MONITORING_OFF", | ||
"MONITORING_ON", | ||
} |
Oops, something went wrong.