Skip to content

test(fuzzer): add fuzzing tests for capec_map_enricher.py (fixes #2167)#2834

Merged
sydseter merged 5 commits intoOWASP:masterfrom
Adarshkumar0509:fix/capec-map-enricher-fuzzer
Apr 18, 2026
Merged

test(fuzzer): add fuzzing tests for capec_map_enricher.py (fixes #2167)#2834
sydseter merged 5 commits intoOWASP:masterfrom
Adarshkumar0509:fix/capec-map-enricher-fuzzer

Conversation

@Adarshkumar0509
Copy link
Copy Markdown
Contributor

@Adarshkumar0509 Adarshkumar0509 commented Apr 18, 2026

Fixes #2167

Changes

  • Rewrote tests/scripts/capec_map_enricher_fuzzer.py to follow the
    same pattern as the existing convert_fuzzer.py
  • Added unittest.TestCase and assertLogs pattern matching convert_fuzzer.py
  • Initialized enricher_vars with a valid args Namespace at module
    level to prevent crash in set_logging() before mocks apply
  • Added per-argument fuzzing (version, edition, input_path, output_path,
    capec_json) as separate test cases
  • Added Categories/Category fuzzing in fuzzed JSON data
  • Fixed install_cornucopia_deps.txt: updated pathspec from 0.12.1 to
    1.0.0 with correct hash to resolve dependency conflict with mypy

Testing

  • Build verified with oss-fuzz ClusterFuzzLite locally
  • check_build passed: INFO:__main__:Check build passed.

AI Tool Disclosure

  • My contribution does not include any AI-generated content

Affirmation

@Adarshkumar0509 Adarshkumar0509 force-pushed the fix/capec-map-enricher-fuzzer branch from 0f2cc4d to 945c5ee Compare April 18, 2026 07:38
@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

hii @sydseter sir , The ClusterFuzzLite failures are caused by a pre existing conflict in upstream master's install_cornucopia_deps.txt: pathspec==0.12.1 conflicts with mypy==1.20.0 which requires pathspec>=1.0.0. Should I open a separate PR to fix this dependency conflict, or will it be handled separately?

@sydseter
Copy link
Copy Markdown
Collaborator

@Adarshkumar0509 We should look at that separately. If you want to, you are welcome to have a go at it. I‘ll merge this. Your improving test coverage is good enough.

@sydseter sydseter merged commit e539367 into OWASP:master Apr 18, 2026
9 of 12 checks passed
@Adarshkumar0509
Copy link
Copy Markdown
Contributor Author

Thank you @sydseter yeah that make sense I would be happy to open a separate PR to fix the pathspec dependency conflict. I will work on that next.

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.

Create fuzzer tests for the convert_capec_map_to_asvs_map python scrip

2 participants