Skip to content

Commit

Permalink
Add CheckDisks for disk encryption posture rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jlu-cloudflare committed Feb 1, 2023
1 parent e4ad1e5 commit 946ffcc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
39 changes: 20 additions & 19 deletions device_posture_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,25 +162,26 @@ type DevicePostureRuleMatch struct {

// DevicePostureRuleInput represents the value to be checked against.
type DevicePostureRuleInput struct {
ID string `json:"id,omitempty"`
Path string `json:"path,omitempty"`
Exists bool `json:"exists,omitempty"`
Thumbprint string `json:"thumbprint,omitempty"`
Sha256 string `json:"sha256,omitempty"`
Running bool `json:"running,omitempty"`
RequireAll bool `json:"requireAll,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Version string `json:"version,omitempty"`
VersionOperator string `json:"versionOperator,omitempty"`
Overall string `json:"overall,omitempty"`
SensorConfig string `json:"sensor_config,omitempty"`
Os string `json:"os,omitempty"`
OsDistroName string `json:"os_distro_name,omitempty"`
OsDistroRevision string `json:"os_distro_revision,omitempty"`
Operator string `json:"operator,omitempty"`
Domain string `json:"domain,omitempty"`
ComplianceStatus string `json:"compliance_status,omitempty"`
ConnectionID string `json:"connection_id,omitempty"`
ID string `json:"id,omitempty"`
Path string `json:"path,omitempty"`
Exists bool `json:"exists,omitempty"`
Thumbprint string `json:"thumbprint,omitempty"`
Sha256 string `json:"sha256,omitempty"`
Running bool `json:"running,omitempty"`
RequireAll bool `json:"requireAll,omitempty"`
CheckDisks []string `json:"checkDisks,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Version string `json:"version,omitempty"`
VersionOperator string `json:"versionOperator,omitempty"`
Overall string `json:"overall,omitempty"`
SensorConfig string `json:"sensor_config,omitempty"`
Os string `json:"os,omitempty"`
OsDistroName string `json:"os_distro_name,omitempty"`
OsDistroRevision string `json:"os_distro_revision,omitempty"`
Operator string `json:"operator,omitempty"`
Domain string `json:"domain,omitempty"`
ComplianceStatus string `json:"compliance_status,omitempty"`
ConnectionID string `json:"connection_id,omitempty"`
}

// DevicePostureRuleListResponse represents the response from the list
Expand Down
4 changes: 3 additions & 1 deletion device_posture_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ func TestDevicePostureDiskEncryptionRule(t *testing.T) {
}
],
"input": {
"requireAll": true
"requireAll": true,
"checkDisks": ["C", "D"]
}
}
}
Expand All @@ -419,6 +420,7 @@ func TestDevicePostureDiskEncryptionRule(t *testing.T) {
Match: []DevicePostureRuleMatch{{Platform: "ios"}},
Input: DevicePostureRuleInput{
RequireAll: true,
CheckDisks: []string{"C", "D"},
},
}

Expand Down

0 comments on commit 946ffcc

Please sign in to comment.