-
Notifications
You must be signed in to change notification settings - Fork 6
Add 5 Metrics for AMOE #114
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
Draft
lebogg
wants to merge
30
commits into
main
Choose a base branch
from
90-new-add-amoe-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.
Draft
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8eb2238
Empty commit
lebogg 4a26948
Add metric PasswordRotationInterval (#91)
anatheka c12da2d
Update PasswordRotationInterval.yml comment
anatheka 81e2a7f
Merge branch 'main' into 90-new-add-amoe-metrics
anatheka 4a9ab6f
Add Metric AntimalwareScanFrequency (#116)
lebogg c27e6dc
Remove target value from "comments" field
lebogg bfbf87c
Add PasswordLength Metric (#113)
lebogg 21fc83d
Merge branch 'main' into 90-new-add-amoe-metrics
anatheka 3dcf8ca
Merge branch 'main' into 90-new-add-amoe-metrics
anatheka c373c97
Add hardware resource entry to catalog
anatheka 97ae8aa
Add merged ontology file [skip ci]
github-actions[bot] 4824091
Add generated proto file [skip ci]
github-actions[bot] 1ad838e
Merge main and fix conflicts
anatheka 2b23b1c
Rename yml -> yaml
anatheka d76267e
Adapt implementation guidelines
anatheka b70457f
Adapt implementation guidelines
anatheka ebbcbff
Add AMOE keywords
anatheka 2cb2836
Add uload proto as artifact
anatheka 8fca166
Fix ontology prefix for scanInterval
anatheka 0fc8e51
Fix ontology scanInterval IRI
anatheka 3a8258a
Auto-update merged ontology and proto files [skip ci]
github-actions[bot] fd82405
Update metrics/LoggingMonitoring/AntimalwareScanFrequency/metric.rego
anatheka 6e1a08b
Update ontology/v1/core/security.owx
anatheka b54bbb9
Update ontology/v1/core/security.owx
anatheka ed6db57
Auto-update merged ontology and proto files [skip ci]
github-actions[bot] beb3553
Update ontology/v1/core/security.owx
anatheka a84d853
Update ontology/v1/core/security.owx
anatheka a445e3d
Clean up data property length
anatheka ae0ed0d
Fix prefix in security.owx
anatheka 983c7ab
Auto-update merged ontology and proto files [skip ci]
github-actions[bot] 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
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 @@ | ||
| ontology/1.0/catalog-v001.xml merge=ours |
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
16 changes: 16 additions & 0 deletions
16
metrics/IdentityManagement/PasswordLength/PasswordLength.yaml
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,16 @@ | ||
| # ====== Metadata ====== | ||
| id: PasswordLength | ||
| category: IdentityManagement | ||
| description: This rule assesses whether a [Resource] that offers the property [SecurityFeature.Authenticity.PasswordBasedAuthentication], has [p1:length] set correctly. | ||
| implementationGuidelines: | ||
| AMOE: | ||
| question: "How long should passwords be?" | ||
| keywords: | ||
| - "password" | ||
| version: "1.0" | ||
| comments: This metric evaluates the length of passwords. It ensures that the length is set to a sensible minimum value of characters. | ||
| # ====== Configuration ====== | ||
| configuration: | ||
| p1: | ||
| operator: ">=" | ||
| targetValue: 8 # defined in 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "operator": ">=", | ||
| "target_value": 8 | ||
| } |
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,19 @@ | ||
| package cch.metrics.password_length | ||
|
|
||
| import data.cch.compare | ||
| import rego.v1 | ||
|
|
||
| default applicable := false | ||
|
|
||
| default compliant := false | ||
|
|
||
| pwd := input.passwordBasedAuthentication | ||
|
|
||
| applicable if { | ||
| pwd | ||
| } | ||
|
|
||
| compliant if { | ||
| # length is in characters | ||
| compare(data.operator, data.target_value, pwd.length) | ||
| } |
16 changes: 16 additions & 0 deletions
16
metrics/IdentityManagement/PasswordRotationInterval/PasswordRotationInterval.yaml
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,16 @@ | ||
| # ====== Metadata ====== | ||
| id: PasswordRotationInterval | ||
| category: IdentityManagement | ||
| description: This rule assesses whether a [Resource] that offers the property [SecurityFeature.Authenticity.PasswordBasedAuthentication], has [p1:rotationInterval] set correctly. | ||
| implementationGuidelines: | ||
| AMOE: | ||
| question: "What is the passwords rotation frequency?" | ||
| keywords: | ||
| - "password" | ||
| version: "1.0" | ||
| comments: This metric evaluates the rotation interval of passwords. It ensures that the interval is set to a sensible maximum value. | ||
| # ====== Configuration ====== | ||
| configuration: | ||
| p1: | ||
| operator: "<=" | ||
| targetValue: 120 # defined in days |
4 changes: 4 additions & 0 deletions
4
metrics/IdentityManagement/PasswordRotationInterval/data.json
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": 120 | ||
| } |
19 changes: 19 additions & 0 deletions
19
metrics/IdentityManagement/PasswordRotationInterval/metric.rego
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,19 @@ | ||
| package cch.metrics.password_rotation_interval | ||
|
|
||
| import data.cch.compare | ||
| import rego.v1 | ||
|
|
||
| default applicable := false | ||
|
|
||
| default compliant := false | ||
|
|
||
| pwd := input.passwordBasedAuthentication | ||
|
|
||
| applicable if { | ||
| pwd | ||
| } | ||
|
|
||
| compliant if { | ||
| # rotationInterval is in days | ||
| compare(data.operator, data.target_value, pwd.rotationInterval) | ||
| } |
18 changes: 18 additions & 0 deletions
18
metrics/LoggingMonitoring/AntimalwareScanFrequency/AntimalwareScanFrequency.yaml
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 @@ | ||
| # ====== Metadata ====== | ||
| id: AntimalwareScanFrequency | ||
| category: LoggingMonitoring | ||
| description: This rule assesses whether a [Resource] that offers the property [SecurityFeature.Auditing.MalwareProtection], has [p1:scan_interval] set correctly. | ||
| implementationGuidelines: | ||
| AMOE: | ||
| question: "How frequent are antimalware scans done?" | ||
| keywords: | ||
| - "antimalware" | ||
| - "malware" | ||
| - "scan" | ||
| version: "1.0" | ||
| comments: "This metric evaluates the frequency of Antimalware scans. It ensures that the interval is set to a sensible maximum value." | ||
| # ====== Configuration ====== | ||
| configuration: | ||
| p1: | ||
| operator: "<=" | ||
| targetValue: 10 # in days? (TODO) | ||
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": 10 | ||
| } |
19 changes: 19 additions & 0 deletions
19
metrics/LoggingMonitoring/AntimalwareScanFrequency/metric.rego
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,19 @@ | ||
| package cch.metrics.antimalware_scan_frequency | ||
|
|
||
| import data.cch.compare | ||
| import rego.v1 | ||
|
|
||
| default applicable = false | ||
|
|
||
| default compliant = false | ||
|
|
||
| mp := input.malwareProtection | ||
|
|
||
| applicable if { | ||
| mp | ||
| } | ||
|
|
||
| compliant if { | ||
| # scan_interval is in days | ||
| compare(data.operator, data.target_value, mp.scanInterval) | ||
| } |
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,22 +1,22 @@ | ||
| <?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=1769511741676" name="duplicate:https://ontology.cybersecuritycertcluster.eu" uri="ontology.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="duplicate:https://ontology.cybersecuritycertcluster.eu" uri="ontology-merged.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/core" uri="core.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/core/evidence" uri="core/evidence.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/core/framework" uri="core/framework.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/core/functionality" uri="core/functionality.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/core/properties" uri="core/properties.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/core/resource" uri="core/resource.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/core/security" uri="core/security.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/data" uri="data.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/resource" uri="resource.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/resource/application" uri="resource/application.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/resource/document" uri="resource/document.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/resource/hardware" uri="resource/hardware.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/resource/human_resources" uri="resource/human_resources.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/resource/infrastructure" uri="resource/infrastructure.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769511741676" name="https://ontology.cybersecuritycertcluster.eu/resource/ml" uri="resource/ml.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="duplicate:https://ontology.cybersecuritycertcluster.eu" uri="ontology.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="duplicate:https://ontology.cybersecuritycertcluster.eu" uri="ontology-merged.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/core" uri="core.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/core/evidence" uri="core/evidence.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/core/framework" uri="core/framework.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/core/functionality" uri="core/functionality.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/core/properties" uri="core/properties.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/core/resource" uri="core/resource.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/core/security" uri="core/security.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/data" uri="data.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/resource" uri="resource.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/resource/application" uri="resource/application.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/resource/document" uri="resource/document.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/resource/hardware" uri="resource/hardware.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/resource/human_resources" uri="resource/human_resources.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/resource/infrastructure" uri="resource/infrastructure.owx"/> | ||
| <uri id="Automatically generated entry, Timestamp=1769687110406" name="https://ontology.cybersecuritycertcluster.eu/resource/ml" uri="resource/ml.owx"/> | ||
| </group> | ||
| </catalog> |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???