Skip to content

Fixing SCAs - #864

Open
MaciejKaszynski wants to merge 9 commits into
eclipse-score:mainfrom
etas-contrib:SCAs
Open

MaciejKaszynski wants to merge 9 commits into
eclipse-score:mainfrom
etas-contrib:SCAs

Conversation

@MaciejKaszynski

Copy link
Copy Markdown
Contributor

Fixing all current codeql findings

// whole T.
// The destination holds sizeof(T) by the static_assert on ElementSize.
// codeql[c/cert/library-function-argument-out-of-bounds] False positive: &value is a whole T
static_cast<void>(std::memcpy(n.storage, &value, sizeof(T)));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could potentially remove this warning by casting &value to const void*/void*.
This also applies to the other similar suppressions.

If memcpy fails, we are treating it as success, that does not sounds good.
If this is ok we should comment why.

{
// The object is constructed by std::vector::emplace_back in AliveWorkerFactory::createAliveIfIpc before init()
// is called.
// codeql[cpp/cert/missing-constructor-call-for-manually-managed-object] Constructed by emplace_back

@cameron-craig-etas cameron-craig-etas Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we have any guidelines for these suppressions?

I feel like it would be a good idea to differentiate between a false positive and a suppression of a genuine warning? Sounds like this is a false positive, and maybe it should be marked as such?

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — ebae0bad Waiting Oct 27, 2026 by MaciejKaszynski via Build and test x86_64-qnx / approval #1827
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants