Requirements#
JSON Requirements
|
status: draft
security: YES
safety: ASIL_B
|
||||
bazel_module: score_baselibs
version: 1
realizes: wp__requirements_comp
|
|||||
Generic Document
|
|||||
General Requirements#
JSON maximum nesting depth
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
testlink: JsonParserTest__EnforcesMaximumNestingDepth (passed); JsonParserTest__RejectsDeepInputWithoutRetainingState (passed)
version: 1
derived from: feat_req__baselibs__json_library
covers: aou_req__json__stack_budget
satisfied by: comp__baselibs_json
mitigates: comp_saf_dfa__json__nesting_depth
|
|||||
The JSON parser shall return a parsing error for JSON data that is nested deeper than 64 levels. |
|||||
Component Requirement
|
|||||
JSON nesting depth counting
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json
|
|||||
The JSON parser shall count only the arrays and objects along a root-to-value path, including the root container, as nesting depth. |
|||||
Component Requirement
|
|||||
JSON nesting depth limit inclusion
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
testlink: JsonTest__NestedTreeAtMaximumDepthSurvivesRoundTrip (passed); JsonParserTest__EnforcesMaximumNestingDepth (passed)
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json
|
|||||
The JSON parser shall accept JSON data whose nesting depth is lower than or equal to 64. |
|||||
Component Requirement
|
|||||
JSON nesting depth file parsing
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json
|
|||||
The JSON parser shall apply the maximum nesting depth defined in JSON maximum nesting depth (comp_req__json__maximum_nesting_depth) to JSON data parsed from files in the same way as to JSON data parsed from buffers. |
|||||
Component Requirement
|
|||||
JSON nesting depth independence
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
testlink: JsonParserTest__ReusesNestingBudgetAfterErrors (passed); JsonParserTest__RejectsDeepInputWithoutRetainingState (passed)
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json
|
|||||
The JSON parser shall not let rejected input affect the nesting depth budget of subsequent parse calls. |
|||||
Component Requirement
|
|||||
Return data in user format
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json
|
|||||
The JSON-Library shall return parsed data in a compatible user format. Note: The user format shall be a regular type and not defined within the library. |
|||||
Component Requirement
|
|||||
Parsing error reason
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
testlink: FromBuffer/JsonParserErrorReasonTest__ReportsReasonWithParsingError/EmptyDocument (passed); FromBuffer/JsonParserErrorReasonTest__ReportsReasonWithParsingError/MissingComma (passed); FromBuffer/JsonParserErrorReasonTest__ReportsReasonWithParsingError/DuplicateMemberName (passed); FromBuffer/JsonParserErrorReasonTest__ReportsReasonWithParsingError/NumberOutOfRange (passed)
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json_wrapper
|
|||||
The JSON-Library shall report the reason of a parsing error together with the parsing error. |
|||||
Component Requirement
|
|||||
Regular files only
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
testlink: JsonParserTest__FromFileRejectsDirectory (passed); JsonParserTest__FromFileRejectsFifoWithoutBlocking (passed)
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json_wrapper
|
|||||
The JSON-Library shall report reading JSON data from a path that does not refer to a regular file as an I/O error. |
|||||
Component Requirement
|
|||||
User friendly API for information exchange#
Support for programming language idioms
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json_wrapper
|
|||||
The public API shall support the idioms of the programming language it is written in. |
|||||
Component Requirement
|
|||||
Use programming language infrastructure
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json_wrapper
|
|||||
The public API shall use core infrastructure of its programming language and accompanying standard libraries, whenever possible and meaningful. Note: This includes error handling. |
|||||
Component Requirement
|
|||||
Enforce strict type compatibility
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json_wrapper
|
|||||
The public API shall enforce strict type compatibility. When a user requests a value, the API shall validate that the requested return type is compatible with the type and value of the stored JSON data. Note: This includes checking if the stored value exceeds the range of the expected type. |
|||||
Component Requirement
|
|||||
Out-of-range error
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
testlink: JsonSerializerTest__ReturnsOutOfRangeForNumberOutsideFieldType (passed); NumberTest__ReturnsOutOfRangeForValueOutsideRequestedType (passed)
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json_wrapper
|
|||||
When a user requests a number as a type whose range does not include the number, the public API shall report an out-of-range error. |
|||||
Component Requirement
|
|||||
Full testability for the user facing API#
Fully testable public API
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json
|
|||||
The public API of the library shall support dependency injection with test doubles. Note: This enables full testability of the user code. |
|||||
Component Requirement
|
|||||
Safety Impact#
JSON library ASIL level
|
status: valid
security: YES
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Functional
version: 1
derived from: feat_req__baselibs__json_library
satisfied by: comp__baselibs_json
|
|||||
The JSON library shall be ASIL-B compliant. |
|||||
Component Requirement
|
|||||
AoU Requirements#
JSON stack budget
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
covered by: comp_req__json__maximum_nesting_depth
mitigates: comp_saf_dfa__json__nesting_depth
|
|||||
The system integrator shall validate the maximum nesting depth defined in JSON maximum nesting depth (comp_req__json__maximum_nesting_depth) against the available thread stack for parsing cleanup, destruction, cloning, comparison and serialization on the deployed platform and toolchain. Note: The maximum nesting depth is not a platform-qualified stack bound. The parser limit does not constrain manually constructed or subsequently modified trees, document size, container width or heap consumption. |
|||||
Assumption of Use Requirement
|
|||||
JSON data integrity
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
|
|||||
The user shall provide a string as input which is not corrupted due to HW or QM SW errors. Note: This could be achieved by using a safe read-only filesystem for JSON file storage or a checksum protection on the JSON file content. |
|||||
Assumption of Use Requirement
|
|||||
Access control
|
status: valid
security: NO
safety: ASIL_B
|
||||
tags: baselibs, json
bazel_module: score_baselibs
reqtype: Non-Functional
version: 1
|
|||||
The user shall ensure access control and manipulation prevention on the JSON files. Note: This can be done by the hosting process and system configuration (e.g. by using dm-verity). |
|||||
Assumption of Use Requirement
|
|||||