Skip to content

[ci] Fix semgrep issues with inline nosemgrep comments#22512

Merged
yxieca merged 1 commit into
sonic-net:masterfrom
rustiqly:fix/semgrep-nosemgrep-inline
Feb 24, 2026
Merged

[ci] Fix semgrep issues with inline nosemgrep comments#22512
yxieca merged 1 commit into
sonic-net:masterfrom
rustiqly:fix/semgrep-nosemgrep-inline

Conversation

@rustiqly

Copy link
Copy Markdown
Contributor

Replace .semgrepignore with targeted inline # nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

Fixes line-length violations (E501) from nosemgrep comments by moving comments to preceding lines or reformatting.

Takes over from #22463 per team decision.

Changes:

  • 15 files with inline # nosemgrep: <rule-id> comments
  • No functional code changes
  • All lines within 120-char limit

@linux-foundation-easycla

linux-foundation-easycla Bot commented Feb 20, 2026

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: rustiqly / name: Rustiqly (decba53)

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Replace .semgrepignore with targeted inline # nosemgrep comments for
28 legacy infrastructure files (ansible, spytest). This addresses
the semgrep findings without blanket directory-level suppression.

Fixes line-length violations from nosemgrep comments by moving
comments to preceding lines or reformatting.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
@rustiqly rustiqly force-pushed the fix/semgrep-nosemgrep-inline branch from e29048b to decba53 Compare February 21, 2026 01:00
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@nate-nexthop

Copy link
Copy Markdown
Contributor

Why did we need a new PR? Keeping the original PR keeps all the discussion about an issue in one place.

I do prefer the individual no-semgrep rather than blanket ignoring for files though, thanks!

@yxieca yxieca left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed: nosemgrep annotations only; looks good.

@yxieca yxieca merged commit 78d6359 into sonic-net:master Feb 24, 2026
22 checks passed
aronovic pushed a commit to aronovic/sonic-mgmt that referenced this pull request Mar 3, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: Mihut Aronovici <aronovic@cisco.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Mar 3, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: Venkata Gouri Rajesh Etla <vrajeshe@cisco.com>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Apr 1, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
albertovillarreal-keys pushed a commit to albertovillarreal-keys/sonic-mgmt that referenced this pull request Apr 3, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Apr 20, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Jun 11, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Jun 11, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Jun 11, 2026
What is the motivation for this PR
Replace .semgrepignore with targeted inline nosemgrep comments for 28 legacy infrastructure files (ansible, spytest). This addresses the semgrep findings without blanket directory-level suppression.

How did you do it
Added inline nosemgrep annotations to 15 files and reformatted to keep lines within 120 chars. No functional code changes.

How did you verify/test it
Not provided in PR description.

Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
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 this pull request may close these issues.

4 participants