Skip to content

[Task]: Suspicious commands needs its own pipeline #1039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lukehinds opened this issue Feb 13, 2025 · 3 comments · Fixed by #1043
Open

[Task]: Suspicious commands needs its own pipeline #1039

lukehinds opened this issue Feb 13, 2025 · 3 comments · Fixed by #1043

Comments

@lukehinds
Copy link
Contributor

Description

Suspicious commands is not implemented into the pipeline, its instead hooking into the main pipeline output:

https://github.com/stacklok/codegate/blob/main/src/codegate/pipeline/comment/output.py#L54

It should instead be a pipeline object in the same way as PII, secrets etc.

Additional Context

No response

@therealnb
Copy link
Contributor

The code was generally in the right place and generally working. Secrets and PII were being found, but this was real.

Shell languages were not being recognised, this is alleviated here https://github.com/stacklok/codegate/pull/1043/files#diff-f7211151eec890242ec818bcdda3b3a175dda1c686533e679771037692952d5fL141

In copilot edits, the deltas were being passed as snippets. We have alleviated that here https://github.com/stacklok/codegate/pull/1043/files#diff-0658dbd5db53af1b59ad53ac8ce9dc0ba40042abea62cce7f6b04eebf3fa4cffR63
So that suspicious commands will not be applied to the main programming languages.

Both of these will have corner cases, but these fixes offer a low impact set of changes.

@therealnb
Copy link
Contributor

Also reported this #1044
CC @jhrozek

@therealnb
Copy link
Contributor

Note that we had to disable this code #1073

It is now unclear where this code should go.

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 a pull request may close this issue.

2 participants