Class: AffectedCode
The Affected Code object describes details about a code block identified as
vulnerable.
URI: ocsf:AffectedCode
classDiagram
class AffectedCode
click AffectedCode href "../AffectedCode/"
Object <|-- AffectedCode
click Object href "../Object/"
AffectedCode : end_column
AffectedCode : end_line
AffectedCode : file
AffectedCode --> "1" File : file
click File href "../File/"
AffectedCode : owner
AffectedCode --> "0..1" User : owner
click User href "../User/"
AffectedCode : remediation
AffectedCode --> "0..1" Remediation : remediation
click Remediation href "../Remediation/"
AffectedCode : rule
AffectedCode --> "0..1 _recommended_" Rule : rule
click Rule href "../Rule/"
AffectedCode : start_column
AffectedCode : start_line
Inheritance
- OcsfObject
- Object
- AffectedCode
- Object
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| end_column | 0..1 recommended Integer |
The column number of the last part of the assessed code identified as | direct |
| end_line | 0..1 recommended Integer |
The line number of the last line of code block identified as vulnerable | direct |
| file | 1 File |
Details about the file that contains the affected code block | direct |
| owner | 0..1 User |
Details about the user that owns the affected file | direct |
| remediation | 0..1 Remediation |
Describes the recommended remediation steps to address identified issue(s) | direct |
| rule | 0..1 recommended Rule |
Details about the specific rule, e | direct |
| start_column | 0..1 recommended Integer |
The column number of the first part of the assessed code identified as | direct |
| start_line | 0..1 recommended Integer |
The line number of the first line of code block identified as vulnerable | direct |
Usages
| used by | used in | type | used |
|---|---|---|---|
| Vulnerability | affected_code | range | AffectedCode |
In Subsets
Aliases
- Affected Code
Identifier and Mapping Information
Schema Source
- from schema: https://w3id.org/lmodel/ocsf
Mappings
| Mapping Type | Mapped Value |
|---|---|
| self | ocsf:AffectedCode |
| native | ocsf:AffectedCode |
| related | core:Product |
| close | cwe:DemonstrativeExample |
LinkML Source
Direct
name: AffectedCode
description: 'The Affected Code object describes details about a code block identified
as
vulnerable.'
in_subset:
- objects_subset
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- Affected Code
close_mappings:
- cwe:DemonstrativeExample
related_mappings:
- core:Product
is_a: Object
slots:
- end_column
- end_line
- file
- owner
- remediation
- rule
- start_column
- start_line
slot_usage:
end_column:
name: end_column
description: 'The column number of the last part of the assessed code identified
as
vulnerable.'
recommended: true
end_line:
name: end_line
recommended: true
file:
name: file
description: Details about the file that contains the affected code block.
required: true
owner:
name: owner
description: Details about the user that owns the affected file.
rule:
name: rule
description: 'Details about the specific rule, e.g., those defined as part of
a larger
<code>policy</code>, that triggered the finding.'
recommended: true
start_column:
name: start_column
description: 'The column number of the first part of the assessed code identified
as
vulnerable.'
recommended: true
start_line:
name: start_line
recommended: true
Induced
name: AffectedCode
description: 'The Affected Code object describes details about a code block identified
as
vulnerable.'
in_subset:
- objects_subset
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- Affected Code
close_mappings:
- cwe:DemonstrativeExample
related_mappings:
- core:Product
is_a: Object
slot_usage:
end_column:
name: end_column
description: 'The column number of the last part of the assessed code identified
as
vulnerable.'
recommended: true
end_line:
name: end_line
recommended: true
file:
name: file
description: Details about the file that contains the affected code block.
required: true
owner:
name: owner
description: Details about the user that owns the affected file.
rule:
name: rule
description: 'Details about the specific rule, e.g., those defined as part of
a larger
<code>policy</code>, that triggered the finding.'
recommended: true
start_column:
name: start_column
description: 'The column number of the first part of the assessed code identified
as
vulnerable.'
recommended: true
start_line:
name: start_line
recommended: true
attributes:
end_column:
name: end_column
description: 'The column number of the last part of the assessed code identified
as
vulnerable.'
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- End Column
rank: 1000
alias: end_column
owner: AffectedCode
domain_of:
- AffectedCode
range: integer
recommended: true
end_line:
name: end_line
description: The line number of the last line of code block identified as vulnerable.
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- End Line
rank: 1000
alias: end_line
owner: AffectedCode
domain_of:
- OccurrenceDetails
- AffectedCode
range: integer
recommended: true
file:
name: file
description: Details about the file that contains the affected code block.
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- File
rank: 1000
alias: file
owner: AffectedCode
domain_of:
- Osint
- QueryEvidence
- Script
- AffectedCode
- Databucket
- Evidences
- Job
- KernelDriver
- Module
- Process
- FileHosting
- FileQuery
- DataSecurityFinding
- EmailFileActivity
- FtpActivity
- HttpActivity
- NetworkFileActivity
- RdpActivity
- SmbActivity
- SshActivity
- FileRemediationActivity
- EventLogActvity
- FileActivity
range: File
required: true
owner:
name: owner
description: Details about the user that owns the affected file.
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- Owner
rank: 1000
alias: owner
owner: AffectedCode
domain_of:
- AffectedCode
- ApplicationObject
- Databucket
- Endpoint
- File
- ResourceDetails
range: User
remediation:
name: remediation
description: Describes the recommended remediation steps to address identified
issue(s).
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- Remediation Guidance
rank: 1000
alias: remediation
owner: AffectedCode
domain_of:
- Vulnerability
- AffectedCode
- AffectedPackage
- CisBenchmarkResult
- FindingObject
- ApplicationSecurityPostureFinding
- ComplianceFinding
- DetectionFinding
- IamAnalysisFinding
- RemediationActivity
range: Remediation
rule:
name: rule
description: 'Details about the specific rule, e.g., those defined as part of
a larger
<code>policy</code>, that triggered the finding.'
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- Rule
rank: 1000
alias: rule
owner: AffectedCode
domain_of:
- AffectedCode
- CisBenchmarkResult
range: Rule
recommended: true
start_column:
name: start_column
description: 'The column number of the first part of the assessed code identified
as
vulnerable.'
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- Start Column
rank: 1000
alias: start_column
owner: AffectedCode
domain_of:
- AffectedCode
range: integer
recommended: true
start_line:
name: start_line
description: The line number of the first line of code block identified as vulnerable.
from_schema: https://w3id.org/lmodel/ocsf
aliases:
- Start Line
rank: 1000
alias: start_line
owner: AffectedCode
domain_of:
- OccurrenceDetails
- AffectedCode
range: integer
recommended: true