Skip to content

ISSUE-219 - String patterns, remove S-313 warning annotations - #245

Merged
stroncoso merged 3 commits into
camaraproject:mainfrom
stroncoso:stroncoso/issue219-s313-patterns
Oct 16, 2026
Merged

stroncoso merged 3 commits into
camaraproject:mainfrom
stroncoso:stroncoso/issue219-s313-patterns

Conversation

@stroncoso

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • correction

What this PR does / why we need it:

The minimium change to prevent the WARNING to be annotated on the validation. This PR adds a pattern to the 16 string fields flagged by S-313 (owasp:api4:2023-string-restricted) in #219, as a base guard against injection:

  • Basic: : '^[^\x00-\x1F\x7F]+$' (no ASCII control characters, so no CR/LF header injection, NUL or ESC).
    • IDs, names, type, reason, terminationDescription
  • Multi-line: '^[^\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+$' (same, but allows TAB/CR/LF, which SDP needs).
    • sdp

maxLength is unchanged and still sets the length.

Which issue(s) this PR fixes:

Fixes #219

Special notes for reviewers:

  • All example values in the specs match the new patterns.

Changelog input

 release-note
fix(registration): S-313 pattern base added
fix(call-handling): S-313 pattern base added
fix(events): S-313 pattern base added

Additional documentation

n/a

@deepakjaiswal1 deepakjaiswal1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stroncoso
stroncoso merged commit fc378cf into camaraproject:main Oct 16, 2026
2 checks passed
@stroncoso
stroncoso deleted the stroncoso/issue219-s313-patterns branch October 16, 2026 21:56
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.

String has no format/pattern/enum

2 participants