-
Notifications
You must be signed in to change notification settings - Fork 6
Add Resource Inventory #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anatheka
wants to merge
30
commits into
main
Choose a base branch
from
27-add-inventory-metrics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
97a7844
Add Resource Inventory
anatheka 732139c
Merge branch 'main' into 27-add-inventory-metrics
anatheka c41647d
Merge branch 'main' into 27-add-inventory-metrics
anatheka c737141
Merge branch 'main' into 27-add-inventory-metrics
immqu 6bb2f9d
add inventory to ontology, add automatic discovery metric
immqu 932005f
Add merged ontology file [skip ci]
github-actions[bot] 826812c
Add generated proto file [skip ci]
github-actions[bot] 8823d42
Merge branch 'main' into 27-add-inventory-metrics
anatheka 7d0cd86
Merge main
anatheka 42f6904
Add merged ontology file [skip ci]
github-actions[bot] 853ec9b
Add generated proto file [skip ci]
github-actions[bot] 82a9711
Clean up metrics
anatheka 5e7ba5d
Merge branch '27-add-inventory-metrics' of github.com:Cybersecurity-C…
anatheka 28c7f37
Clean up metric.rego files
anatheka 90ace5b
Revert infrastructure.owx
anatheka fab73fa
Add merged ontology file [skip ci]
github-actions[bot] 8755ec6
Add generated proto file [skip ci]
github-actions[bot] 5d187e7
Add ontology object ResourceInventoryService
anatheka 7f92021
Merge branch '27-add-inventory-metrics' of github.com:Cybersecurity-C…
anatheka a3182b7
Merge branch 'main' into 27-add-inventory-metrics
anatheka 369ff79
Add merged ontology file [skip ci]
github-actions[bot] b8581a3
Add generated proto file [skip ci]
github-actions[bot] 62de026
Fix labels
anatheka 10515eb
Fix file extension
anatheka 261df0c
Merge branch 'main' into 27-add-inventory-metrics
anatheka 8b7b9f5
Merge branch 'main' into 27-add-inventory-metrics
anatheka b830a26
Auto-update merged ontology and proto files [skip ci]
github-actions[bot] 028f786
Add yaml files
anatheka 48e7103
Merge branch '27-add-inventory-metrics' of github.com:Cybersecurity-C…
anatheka c214ca8
Fix yaml files
anatheka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
metrics/Inventory/AutomaticDiscoveryEnabled/AutomaticDiscoveryEnabled.yml
This file contains hidden or 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,9 @@ | ||
| --- # Metadata | ||
| - id: ResourceInventoryEnabled | ||
| - description: This rule evaluates whether an [AssetInventory] is [p1:enabled] | ||
|
anatheka marked this conversation as resolved.
Outdated
|
||
| - version: "1.0" | ||
| - comments: An asset inventory is a tool to manage resources and their lifecycles which is essential for maintaining security and compliance. | ||
| --- # Configuration data | ||
| - p1: | ||
| - operator: == | ||
| - targetValue: True | ||
This file contains hidden or 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,4 @@ | ||
| { | ||
| "operator" : "==", | ||
| "target_value" : true | ||
| } |
This file contains hidden or 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,18 @@ | ||
| package cch.metrics.automatic_discovery_enabled | ||
|
|
||
| import data.cch.compare | ||
| import rego.v1 | ||
|
|
||
| default applicable = false | ||
|
|
||
| default compliant = false | ||
|
|
||
| enabled := input.resourceInventory.automaticDiscoveryEnabled | ||
|
|
||
| applicable if { | ||
| input.type[_] == "ResourceInventory" | ||
| } | ||
|
|
||
| compliant if { | ||
| compare(data.operator, data.target_value, enabled) | ||
| } |
9 changes: 9 additions & 0 deletions
9
metrics/Inventory/ResourceInventoryEnabled/ResourceInventoryEnabled.yml
This file contains hidden or 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,9 @@ | ||
| --- # Metadata | ||
| - id: ResourceInventoryEnabled | ||
|
anatheka marked this conversation as resolved.
Outdated
|
||
| - description: This rule evaluates whether a [ResourceInventory] is [p1:enabled] | ||
|
anatheka marked this conversation as resolved.
Outdated
|
||
| - version: "1.0" | ||
| - comments: An asset inventory is a tool to manage resources and their lifecycles which is essential for maintaining security and compliance. | ||
| --- # Configuration data | ||
| - p1: | ||
| - operator: == | ||
| - targetValue: True | ||
This file contains hidden or 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,4 @@ | ||
| { | ||
| "operator" : "==", | ||
| "target_value" : true | ||
| } |
This file contains hidden or 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,18 @@ | ||
| package cch.metrics.resource_inventory_enabled | ||
|
|
||
| import data.cch.compare | ||
| import rego.v1 | ||
|
|
||
| default applicable = false | ||
|
|
||
| default compliant = false | ||
|
|
||
| enabled := input.resourceInventory.enabled | ||
|
|
||
| applicable if { | ||
| input.type[_] == "ResourceInventory" | ||
| } | ||
|
|
||
| compliant if { | ||
| compare(data.operator, data.target_value, enabled) | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,21 +1,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
| <catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | ||
| <group id="Folder Repository, directory=, recursive=true, Auto-Update=true, version=2" prefer="public" xml:base=""> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="duplicate:https://ontology.cybersecuritycertcluster.eu" uri="ontology.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="duplicate:https://ontology.cybersecuritycertcluster.eu" uri="ontology-merged.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/core" uri="core.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/core/evidence" uri="core/evidence.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/core/framework" uri="core/framework.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/core/functionality" uri="core/functionality.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/core/properties" uri="core/properties.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/core/resource" uri="core/resource.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/core/security" uri="core/security.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/data" uri="data.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/resource" uri="resource.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/resource/application" uri="resource/application.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/resource/document" uri="resource/document.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/resource/human_resources" uri="resource/human_resources.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/resource/infrastructure" uri="resource/infrastructure.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1757501533068" name="https://ontology.cybersecuritycertcluster.eu/resource/ml" uri="resource/ml.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1767343274459" name="https://ontology.cybersecuritycertcluster.eu/resource/application" uri="application.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1767343274459" name="https://ontology.cybersecuritycertcluster.eu/resource/document" uri="document.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1767343274459" name="https://ontology.cybersecuritycertcluster.eu/resource/hardware" uri="hardware.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1767343274459" name="https://ontology.cybersecuritycertcluster.eu/resource/human_resources" uri="human_resources.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1767343274459" name="https://ontology.cybersecuritycertcluster.eu/resource/infrastructure" uri="infrastructure.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1767343274459" name="https://ontology.cybersecuritycertcluster.eu/resource/ml" uri="ml.owx"/> | ||
| </group> | ||
| </catalog> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.