Skip to content

Remove MLIB from PP header#118

Merged
jeronstone merged 16 commits into
mainfrom
sample-pp-mlib-dep
Sep 18, 2025
Merged

Remove MLIB from PP header#118
jeronstone merged 16 commits into
mainfrom
sample-pp-mlib-dep

Conversation

@jeronstone
Copy link
Copy Markdown
Contributor

  • Changes policy rule description to a dynamically-allocated string rather than a string_t
  • Removes policy provider struct "name" field since it was hardly utilized, and PP ID gives unique identifier.

Closes #116

@jeronstone jeronstone added this to the BSL v1.1.0 milestone Sep 16, 2025
@jeronstone jeronstone self-assigned this Sep 16, 2025
@jeronstone jeronstone requested a review from a team as a code owner September 16, 2025 18:57
@jeronstone jeronstone added the sustainment Long-term sustainment activities and technical debt removal label Sep 16, 2025
@jeronstone jeronstone added this to BSL Sep 16, 2025
@github-project-automation github-project-automation Bot moved this to Todo in BSL Sep 16, 2025
@jeronstone jeronstone moved this from Todo to In Progress in BSL Sep 16, 2025
@jeronstone
Copy link
Copy Markdown
Contributor Author

Quality Gate Failed Quality Gate failed

Failed conditions 1 Security Hotspot

See analysis details on SonarQube Cloud

I believe this is safe since the N is limited by strnlen

Copy link
Copy Markdown
Collaborator

@BrianSipos BrianSipos left a comment

Choose a reason for hiding this comment

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

With additional docs this is a helpful API simplification.

Comment thread src/policy_provider/SamplePolicyProvider.c Outdated
Comment thread src/policy_provider/SamplePolicyProvider.h
Comment thread src/policy_provider/SamplePolicyProvider.c Outdated
Copy link
Copy Markdown
Collaborator

@BrianSipos BrianSipos left a comment

Choose a reason for hiding this comment

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

I hate to dwell on this but can you produce a simple unit test function to exercise what happens when the input text exceeds the limit? Just to verify it stops on the right char and still gets null terminator. Then we can ack the sonar complaint and be all green.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 18, 2025

@jeronstone jeronstone merged commit 740079a into main Sep 18, 2025
16 checks passed
@jeronstone jeronstone deleted the sample-pp-mlib-dep branch September 18, 2025 15:30
@github-project-automation github-project-automation Bot moved this from In Progress to Done in BSL Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sustainment Long-term sustainment activities and technical debt removal

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Move mlib headers from sample pp header to compilation unit itself

2 participants