Skip to content

Conversation

@carolynduby
Copy link
Collaborator

No description provided.

openhands-agent and others added 30 commits October 16, 2025 15:45
…line annotations to String.join

- Removed org.adrianwalker.multilinestring.Multiline dependency from all pom.xml files
- Converted all @Multiline annotations to String.join statements in 71 Java test files
- Preserved license headers and file structure
- Removed * characters from comment lines as requested
- Fixed malformed POM XML tags left after dependency removal

Co-authored-by: openhands <[email protected]>
…ions to String.join

- Fixed missing content in expectedMessageString, sourceConfigStr, and sourceConfigWithCFStr variables
- Converted comments above @Multiline annotations to String.join parameters as requested
- Removed * characters from comment lines as specified

Co-authored-by: openhands <[email protected]>
… to String.join

- Fixed missing content in mapConfig_subgroup, mapConfig_default, and allVariableConfig variables
- Converted comments above @Multiline annotations to String.join parameters as requested
- Removed * characters from comment lines as specified
- Preserved proper JSON formatting and Stellar configuration syntax

Co-authored-by: openhands <[email protected]>
…ions to String.join

- Fixed missing content in expectedMessageString and sourceConfigStr variables
- Converted comments above @Multiline annotations to String.join parameters as requested
- Removed * characters from comment lines as specified
- Preserved proper JSON formatting for threat intelligence configuration

Co-authored-by: openhands <[email protected]>
… String.join

- Fixed missing content in goodMessage and dateFormattedMessage variables
- Converted comments above @Multiline annotations to String.join parameters as requested
- Removed * characters from comment lines as specified
- Preserved proper Snort log format with CSV-style data including timestamps and alert details
- Fixed both date formats: MM/dd/yy and MM/dd/yyyy for timestamp parsing tests

Co-authored-by: openhands <[email protected]>
… with proper YAF JSON data

- Restored complete YAF (Yet Another Flowmeter) JSON structure with network flow data
- Fixed conversion that only kept opening brace instead of full JSON content
- Includes proper network flow fields: timestamps, IP addresses, ports, protocols, flags, etc.
- Maintains original test functionality for YAF parser validation
… with proper CSV parser configuration

- Restored complete CSV parser configuration JSON with column mappings
- Fixed conversion that left empty string instead of full JSON configuration
- Includes parserClassName, sensorTopic, and column definitions for CSV parsing
- Maintains original test functionality for CSV parser validation with proper column mapping (col1, col2, col3)
….join with proper JSON test data

- Fixed 3 variables: happyPathJSON, collectionHandlingJSON, mixCollectionHandlingJSON
- Restored complete JSON test data for different parser scenarios:
  * happyPathJSON: Simple JSON with foo, blah, and number fields
  * collectionHandlingJSON: Complex nested JSON with collection objects for testing unfold/allow/drop strategies
  * mixCollectionHandlingJSON: Mixed collection structure for testing key collision handling
- Maintains original test functionality for JSON map parser validation with various collection handling strategies
…s to String.join with proper regex parser configurations

- Fixed 4 variables: parserConfig1, parserConfigNoMessageHeader, invalidParserConfig, noRecordTypeParserConfig
- Restored complete regex parser configurations for different test scenarios:
  * parserConfig1: Full configuration with messageHeaderRegex and comprehensive field mappings for syslog parsing
  * parserConfigNoMessageHeader: Configuration without message header regex for testing alternative parsing paths
  * invalidParserConfig: Malformed configuration for testing error handling with invalid regex patterns
  * noRecordTypeParserConfig: Configuration missing recordTypeRegex for testing validation logic
- Maintains original test functionality for regex parser validation with complex syslog parsing rules
- Includes extensive regex patterns for SSH, kernel, FTP, and other system log parsing scenarios
- Fixed empty config string that was causing test failures
- Added proper JSON data: {"a": "hello", "b": "world"}
- All 3 test methods now pass successfully:
  - loads_file_with_typeref()
  - loads_file_with_map_class()
  - loads_file_with_custom_class()

Co-authored-by: openhands <[email protected]>
- Fixed incorrect expected values that were set to just '*/'
- Added proper ASCII table format expectations for:
  - testListVarsWithVars: Variable listing table with foo variable
  - testListVarsWithoutVars: Empty variable listing table
  - testMap2Table: Key-value table with field1/field2 data
  - testMap2TableNullInput: Empty key-value table
- Expected values now match actual function output format
- Tests now have correct assertions (infrastructure serialization issues remain)

Co-authored-by: openhands <[email protected]>
…va - convert @Multiline annotations to String.join with proper JSON configurations

- EnrichmentConfigTest.java: Added enrichment configuration with fieldMap containing geo, host, and stellar configurations
- SensorEnrichmentUpdateConfigTest.java: Added three JSON configurations:
  * sourceConfigStr: Enrichment and threat intel configuration with field mappings and triage rules
  * threatIntelConfigStr: Threat intel sensor configuration with field to enrichment type mappings
  * enrichmentConfigStr: Enrichment sensor configuration with field to enrichment type mappings

Co-authored-by: openhands <[email protected]>
… convert @Multiline annotations to String.join with proper JSON stellar configurations

- StellarEnrichmentConfigTest.java: Convert conf variable with DGA model endpoint configuration
- StellarEnrichmentTest.java: Convert 9 configuration variables with various stellar config patterns:
  * defaultStellarConfig_map/list/listWithTemp: Basic stellar configurations
  * groupedStellarConfig_map/list/listWithTemp: Grouped stellar configurations
  * mixedStellarConfig_map/list: Mixed stellar configurations
  * tempVarStellarConfig_list: Temporary variable stellar configuration
  * message: Test message JSON data

Co-authored-by: openhands <[email protected]>
…s to String.join

- FieldTransformationTest.java: Fixed 3 configurations (complexConfig, config, badConfigMissingMapping)
- RegexSelectTransformationTest.java: Fixed 5 configurations (routeSingleInSingleOut, routeMissingInput, routeMissingOutput, routeMultiOutput, routeBadRegex)
- RenameTransformationTest.java: Fixed 2 configurations (smoketestConfig, renameMissingField)
- StellarTransformationTest.java: Fixed 8 configurations (badConfig, configAll, configRename, configNumericDomain, stellarConfig, intermediateValuesConfig, stellarConfigEspecial, stellarConfig_multi)
- RemoveTransformationTest.java: Fixed 2 configurations (removeUnconditionalConfig, removeConditionalConfig)

All @Multiline annotations have been successfully converted to String.join statements with proper JSON formatting.
Removed all * characters from comment lines as requested.

Co-authored-by: openhands <[email protected]>
…g.join

- Converted 5 empty string variables to String.join statements with proper JSON content:
  - string1: Simple JSON object with foo property
  - string2: JSON object with foo and bar properties
  - string3: Simple JSON array with string and number
  - string4: JSON array with multiple strings
  - string5: Complex JSON array with nested objects containing foo1/bar1 and foo2/bar2 properties

All JSON configurations properly formatted for TO_JSON_OBJECT test cases.

Co-authored-by: openhands <[email protected]>
…g.join

- Converted 4 empty string variables to String.join statements with proper JSON validation configurations:
  - validQueryConfig: STELLAR validation with exists(field1) condition
  - invalidQueryConfig1: STELLAR validation with empty config (invalid test case)
  - invalidQueryConfig2: STELLAR validation with malformed condition 'exi and ' (invalid test case)
  - validQueryConfig_map: STELLAR validation with MAP_EXISTS(dc, dc2tz) condition and dc2tz mapping

All JSON configurations properly formatted for field validation test cases.

Co-authored-by: openhands <[email protected]>
- Converted 3 empty string variables to String.join statements with proper JSON validation configurations:
  - validValidationConfigWithStringInput: NOT_EMPTY validation with single string input field1
  - validValidationConfigWithListInput: NOT_EMPTY validation with array input [field1, field2]
  - invalidValidationConfig: Configuration with input field1 but missing validation (invalid test case)

All JSON configurations properly formatted for field validation test cases.

Co-authored-by: openhands <[email protected]>
…g.join

- Fixed DomainValidationTest.java: Converted 2 variables with DOMAIN validation configurations
  - validWithSingleField: Single field1 with DOMAIN validation
  - validWithMultipleFields: Multiple fields [field1, field2] with DOMAIN validation

- Fixed EmailValidationTest.java: Converted 2 variables with EMAIL validation configurations
  - validWithSingleField: Single field1 with EMAIL validation
  - validWithMultipleFields: Multiple fields [field1, field2] with EMAIL validation

- Fixed IPValidationTest.java: Converted 3 variables with IP validation configurations
  - validWithSingleField: Single field1 with IP validation
  - validWithMultipleFields: Multiple fields [field1, field2] with IP validation and IPV4 config
  - validWithMultipleFieldsMultipleTypes: Multiple fields with IP validation and [IPV4,IPV6] config

- Fixed URLValidationTest.java: Converted 2 variables with URL validation configurations
  - validWithSingleField: Single field1 with URL validation
  - validWithMultipleFields: Multiple fields [field1, field2] with URL validation

All network validation test files now use String.join statements instead of @Multiline annotations.

Co-authored-by: openhands <[email protected]>
… tests

- RegexValidationTest.java: Convert 2 @Multiline annotations to String.join with REGEX_MATCH validation configs
- DateValidationTest.java: Convert 2 @Multiline annotations to String.join with DATE validation configs
- NotEmptyValidationTest.java: Convert 2 @Multiline annotations to String.join with NOT_EMPTY validation configs
- IntegerValidationTest.java: Convert 2 @Multiline annotations to String.join with INTEGER validation configs

Co-authored-by: openhands <[email protected]>
The multiline-string dependency has been completely removed from all Java files,
so this version property is no longer needed.

Co-authored-by: openhands <[email protected]>
…g.join

The data variable was incorrectly converted to an empty string in a previous commit.
Restored the original test data content using String.join with the proper values:
foo, bar, grok, foo, the, and, grok, foo, bar

Co-authored-by: openhands <[email protected]>
… strings

The ShellFunctionsTest unit tests were failing because the expected string literals
were missing trailing newlines that the actual shell function output includes.
Added + "\n" to all expectedListWithFoo, expectedEmptyList, expectedMap2Table,
and expectedMap2TableNullInput string literals to match the actual output format.

Co-authored-by: openhands <[email protected]>
… proper backslash escaping

Fixed illegal escape character errors on lines 542, 543, 636, 637, and 1031 by replacing
\u005c Unicode escape sequences with proper double backslash (\\) escaping in JSON strings.
The \u005c sequences were causing compilation errors when followed by commas and spaces.

Changes:
- Line 542: Fixed subject field in knownCertsBroMessage
- Line 543: Fixed issuer_subject field in knownCertsBroMessage
- Line 636: Fixed subject field in sslBroMessage
- Line 637: Fixed issuer field in sslBroMessage
- Line 1031: Fixed certificate.subject and certificate.issuer fields in x509BroMessage

Co-authored-by: openhands <[email protected]>
Fixed compilation error on line 50 where the escape sequence for quotes within
the author field was incorrect. Changed from \"Rees\" to \\"Rees\\" to
properly escape both the backslash and quote characters in the Java string literal.

The JSON string now correctly represents: "author":"    Nigel "Rees", Stas    "

Co-authored-by: openhands <[email protected]>
Fixed syntax error on line 39 where there was an invalid double assignment:
'= null = String.join(...)' which is not valid Java syntax.

Changed to proper single assignment: '= String.join(...)' to initialize
the splitConfigString field with the joined string value.

Co-authored-by: openhands <[email protected]>
- Converted 89 JUnit 4 test files to JUnit 5 Jupiter format
- Updated imports: org.junit.* → org.junit.jupiter.api.*
- Converted annotations: @BeforeClass → @BeforeAll, @afterclass@afterall
- Updated assertions: Assert.* → Assertions.*
- Fixed hamcrest imports: MatcherAssertions → MatcherAssert
- Removed JUnit 4 dependencies from parent and all 24+ child module POMs
- Added JUnit 5 Jupiter dependencies with proper version management
- Cleaned up JUnit dependencies from plugin sections
- Fixed test scope dependencies in metron-enrichment-common
- Verified JUnit 5 migration with standalone test

All 330 test files now use JUnit 5 Jupiter.
JUnit 4 dependencies completely removed from the project.

Co-authored-by: openhands <[email protected]>
- Add JUnit 5 dependencies to parent pom.xml with proper version management
- Add JUnit 5 dependencies to cyber-functions and flink-common modules
- Update Maven compiler plugin to 3.11.0 for better Java compatibility
- Configure Maven Surefire plugin for JUnit 5 support
- Update Lombok version to 1.18.30 for compatibility
- Fix JUnit 5 assertion parameter order in GeneratorScenarioTest.java

Co-authored-by: openhands <[email protected]>
@carolynduby carolynduby merged commit 369b542 into develop Oct 30, 2025
2 checks passed
@carolynduby carolynduby deleted the CYB-222 branch October 30, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants