Skip to content

ENT-8096: Policy profiler in cf-agent#5901

Closed
victormlg wants to merge 3 commits into
cfengine:masterfrom
victormlg:profiler
Closed

ENT-8096: Policy profiler in cf-agent#5901
victormlg wants to merge 3 commits into
cfengine:masterfrom
victormlg:profiler

Conversation

@victormlg

Copy link
Copy Markdown
Contributor

No description provided.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Changelog: The policy profiling logic is now implemented natively within the cf-agent, replacing the previous reliance on cf-agent logs and the cf-profile.pl script for faster execution.
Ticket: ENT-8096
Signed-off-by: Victor Moene <victor.moene@northern.tech>
}
VariableTableIteratorDestroy(iter);
}
EvalContextPushEvent(ctx, EventFrameNew("bundle", owner->name, owner->ns, GetAbsolutePath(owner->source_path), owner->offset));

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter owner in EvalContextStackPushBundleFrame() is dereferenced without an explicit null-check
}
VariableTableIteratorDestroy(iter);
}
EvalContextPushEvent(ctx, EventFrameNew("bundle", owner->name, owner->ns, GetAbsolutePath(owner->source_path), owner->offset));

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter owner in EvalContextStackPushBundleFrame() is dereferenced without an explicit null-check
}
VariableTableIteratorDestroy(iter);
}
EvalContextPushEvent(ctx, EventFrameNew("bundle", owner->name, owner->ns, GetAbsolutePath(owner->source_path), owner->offset));

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter owner in EvalContextStackPushBundleFrame() is dereferenced without an explicit null-check
}
VariableTableIteratorDestroy(iter);
}
EvalContextPushEvent(ctx, EventFrameNew("bundle", owner->name, owner->ns, GetAbsolutePath(owner->source_path), owner->offset));

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter owner in EvalContextStackPushBundleFrame() is dereferenced without an explicit null-check
}
}

EvalContextPushEvent(ctx, EventFrameNew("promise", PromiseGetPromiseType(owner), PromiseGetNamespace(owner), "null", owner->offset));

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter owner in EvalContextStackPushPromiseFrame() is dereferenced without an explicit null-check

if (SeqLength(ctx->event_stack) < 1)
{
ctx->root = popped;

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter ctx in EvalContextPopEvent() is dereferenced without an explicit null-check

void EvalContextEventStackClear(EvalContext *ctx)
{
// SeqClear(ctx->event_stack);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
void EvalContextEventStackClear(EvalContext *ctx)
{
// SeqClear(ctx->event_stack);
ctx->event_stack = SeqNew(10, NULL);

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter ctx in EvalContextEventStackClear() is dereferenced without an explicit null-check

void EvalContextPrintRoot(EvalContext *ctx)
{
EventFrameTraverse(ctx->root, 0);

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter ctx in EvalContextPrintRoot() is dereferenced without an explicit null-check
Comment thread libpromises/fncall.c
WriterClose(fncall_writer);
}

EvalContextPushEvent(ctx, EventFrameNew("function", fp->name, PromiseGetNamespace(fp->caller), "null", fp->caller->offset));

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter caller in FnCallEvaluate() is dereferenced without an explicit null-check
@victormlg victormlg closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants