feat: add POST /rest/v1/suggest_cre_mappings API endpoint#758
Open
Subh24ai wants to merge 2 commits intoOWASP:mainfrom
Open
feat: add POST /rest/v1/suggest_cre_mappings API endpoint#758Subh24ai wants to merge 2 commits intoOWASP:mainfrom
Subh24ai wants to merge 2 commits intoOWASP:mainfrom
Conversation
991f1ba to
703eb5f
Compare
Signed-off-by: Subhash Gupta <subhashgupta1591@gmail.com>
Signed-off-by: Subhash Gupta <subhashgupta1591@gmail.com>
703eb5f to
55968b4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #585 (partial)
What this does
Exposes
suggest_cre_mappings()as a REST API endpoint, making theAI-powered CRE mapping feature accessible from the MyOpenCRE frontend.
Endpoint
POST /rest/v1/suggest_cre_mappingsRequest: multipart/form-data with
cre_csvfileResponse:
{ "mapped": [ { "standard": {"name": "PCI-DSS", "section": "..."}, "suggested_cre_id": "cre-db-id-123", "confidence": 0.85 } ], "needs_review": [...] }How it works
parse_export_format()suggest_cre_mappings()from PR feat: add suggest_cre_mappings() for automatic CRE-to-standard mapping #753Tests
19 tests passing including new endpoint test.
Related