Skip to content
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

Amazon Q marks single line blocks as missing delimiter (CWE-483) #4941

Open
abialystok opened this issue May 7, 2024 · 0 comments
Open

Amazon Q marks single line blocks as missing delimiter (CWE-483) #4941

abialystok opened this issue May 7, 2024 · 0 comments
Labels
amazonq bug We can reproduce the issue and confirmed it is a bug.

Comments

@abialystok
Copy link

Problem

In C code, single line if blocks are getting marked with CWE-483 which should apply to multi-line blocks according the the provided examples (e,g https://docs.aws.amazon.com/codeguru/detector-library/c/incorrect-block-delimitation/)

Steps to reproduce the issue

Example code block:

if (test)
    printf("Hello world\n");

This code will be marked with CWE-483

Expected behavior

This is a single line block so there is no missing delimiter issue.

System details (run AWS: About and/or Amazon Q: About)

OS: Linux x64 5.10.215-181.850.amzn2int.x86_64
Visual Studio Code extension host:  1.85.2
AWS Toolkit:  3.2.0
node: 18.15.0
OS: Linux x64 5.10.215-181.850.amzn2int.x86_64
Visual Studio Code extension host:  1.85.2
Amazon Q:  1.2.0
node: 18.15.0
@abialystok abialystok added the bug We can reproduce the issue and confirmed it is a bug. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amazonq bug We can reproduce the issue and confirmed it is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants