-
Notifications
You must be signed in to change notification settings - Fork 34
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
cpeid should constrain values through CPE version and "Part" component of Well-Formed Name #626
Comments
A follow-on patch will regenerate Make-managed files. References: * #626 Signed-off-by: Alex Nelson <[email protected]>
References: * #626 Signed-off-by: Alex Nelson <[email protected]>
Implementation of this proposal is blocked on #632 . |
Proposal update, in light of a remark from @sbarnum on Issue 596 (Restructuring the @sbarnum offered several disjointedness statements for subclasses of This makes me now think that Requirement 3 of this proposal is not quite correct. It is currently spelled:
The implementation for this proposal had not gotten to testing interactions with #632 (making It seems Requirement 3 must be spelled differently - at the very least, like this:
When I was drafting the proposal, I had forgotten that I think Requirement 3 should be replaced with:
I also think this proposal now needs For further reference, the other disjointedness statements around uco-observable:Application
owl:disjointWith
drafting:ServicePack ,
drafting:Task ,
uco-observable:Library ,
uco-observable:OperatingSystem ,
uco-observable:Process ,
uco-observable:ProcessThread
;
.
uco-observable:OperatingSystem
owl:disjointWith
drafting:BuildUtility ,
drafting:Compiler ,
drafting:ServicePack ,
drafting:Task ,
uco-observable:Application ,
uco-observable:Library ,
uco-observable:Process ,
uco-observable:ProcessThread
;
. |
Background
observable:cpeid
is currently (as of UCO 1.3.0) an unconstrained string.The CPE 2.3 naming specification, NISTIR 7695 provides syntactic constraints for a "Well-Formed Name" (WFN). Some seem appropriate to include in UCO:
Prior versions of the CPE specification(s) are currently available here, but they are not referenced further in this proposal.
Requirements
Requirement 1
UCO must constrain CPEs in
cpeid
to be specified as Well-Formed-Names of the current version, 2.3.(Aside: This intentionally excludes URI forms from being used in
cpeid
.)Requirement 2
UCO must constrain CPEs for
Device
s to use anh
Part (for hardware devices).Requirement 3
UCO must constrain CPEs for
Software
to use ana
Part (for applications).Revision suggested (2024-11-06) after requirements review vote (2024-10-24): Change to:
Requirement 4
UCO must constrain CPEs for
OperatingSystem
to use ano
Part (for operating systems).Non-Requirements
No further constraints on CPE WFN parts are suggested in this proposal. Handling the entire grammar, including escape sequences, makes even counting the number of fields by colon-delimiting likely too cumbersome for a single regular expression to be beneficial.
Risk / Benefit analysis
Benefits
o
observable:cpeid
value because of conflation from its operating system.Risks
Software
class hierarchy #596 or a reduced proposal of 596 that includes the move ofOperatingSystem
underSoftware
. However, the implementation does not necessarily need to wait for either of these conditions to be met.cpeid
does not appear inOperatingSystemFacet
, and Issue 596 will makeOperatingSystem
s a subclass ofSoftware
, the SHACL spelling for operating system CPEs will necessarily be a bit different from the typical UCO spelling for other property constraints, and this difference will be visible to end users. The accompanying Pull Request targeting 1.4.0 shows the validation results of what seems like the most practical shape.Competencies demonstrated
Competency 1
Error detection: A tablet device is given an operating system CPE.
Competency Question 1.1
Is this a valid usage of that CPE WFN?
Result 1.1
No.
The WFN having an
o
value implies the associated item (theobservable:Tablet
) should be an operating system. But, it is a device (i.e., an instance of anobservable:Device
subclass).If that WFN is desired to appear in the graph, the operating system of the device should be modeled as a separate object and tied to the device with an
observable:ObservableRelationship
.Solution suggestion
(I am fine with my examples being transcribed and credited.)
DeviceFacet
in UCO 1.4.0: Add a dedicated shape, severitysh:Warning
, to require a pattern regular expression:For
DeviceFacet
in UCO 2.0.0, cut that property shape, moving thesh:pattern
statement into the property shape forobservable:cpeid
.Do likewise for
SoftwareFacet
, only its pattern would be^cpe:2.3:[a,o]:.+
.Disallow
cpeid
fromOperatingSystemFacet
, guiding users to useSoftwareFacet
instead, and change severity from warning to violation for UCO 2.0.0:OperatingSystem
, constrain CPEs to only use theo
Part value. This property shape may sufficiently satisfy this implementation, by using a path through two predicates; however, it avoids qualifying whichFacet
this applies to.Aside on unpursued option
A "more correct" constraining would instead apply the
o
pattern only on aSoftwareFacet
, which can be done in a few ways. Unfortunately, each is complex to implement without adding additional single-purpose OWL Classes never really meant for a user to explicitly instantiate, or complex spellings of "if P then Q" usingsh:or
. Any of these solutions is likely to be unnecessarily challenging to parse to any end user who ultimately put ana
where ano
should have gone.For example (and it's hopefully clear why this is not in the pull request): In SHACL, spelling "If P, then Q" when custom classes are not an option needs to be done with the Implication-as-Or's spelling, "p → q ≡ ¬p ∨ q". Hence, the option for representing "IF this SoftwareFacet is a facet of an OperatingSystem object, THEN apply the 'o' CPE pattern constraint" is as follows:
A blanket review of
cpeid
fromobservable:OperatingSystem
seems more palatable.Coordination
develop
for the next releasedevelop
state with backwards-compatible implementation merged intodevelop-2.0.0
develop-2.0.0
(or N/A)develop
branch updated to track UCO's updateddevelop
branchdevelop-2.0.0
branch updated to track UCO's updateddevelop-2.0.0
branchThe text was updated successfully, but these errors were encountered: