Skip to content
New issue

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

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

Already on GitHub? # to your account

Introduce make targets for sast and address security issues. #130

Merged
merged 5 commits into from
Dec 23, 2024

Conversation

thiyyakat
Copy link
Contributor

What this PR does / why we need it:
This PR introduces two make targets: sast and sast-report to run gosec for Static Application Security Testing. It also addresses the security issues in the repository. The .ci/check script now calls make sast-report to install and run gosec.

Which issue(s) this PR fixes:
Fixes #129

Special notes for your reviewer:
No changes made to the implementation. Only comments added to suppress gosec warnings wherever appropriate.

Release note:

Adding `gosec` for Static Application Security Testing (SAST).

@thiyyakat thiyyakat requested a review from rishabh-11 December 6, 2024 06:33
@gardener-prow gardener-prow bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 6, 2024
@gardener-prow gardener-prow bot requested a review from unmarshall December 6, 2024 06:34
@rishabh-11 rishabh-11 added kind/enhancement Enhancement, improvement, extension and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Dec 6, 2024
@gardener-robot-ci-1
Copy link
Contributor

This PR proposes changes that would break the pipeline definition:

dependency-watchdog-enh_add-gosec: Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/concourse/replicator.py", line 141, in render
    definition_descriptor = self._render(definition_descriptor)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/concourse/replicator.py", line 185, in _render
    'definition': factory.create_pipeline_definition(),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/concourse/factory.py", line 88, in create_pipeline_definition
    self._apply_traits(variant)
  File "/usr/lib/python3.12/site-packages/concourse/factory.py", line 153, in _apply_traits
    raise ModelValidationError(
model.base.ModelValidationError: JobVariant: head-update: trait requires missing traits: version

@rishabh-11
Copy link
Contributor

/retest-required

Copy link

@shreyas-s-rao shreyas-s-rao left a comment

Choose a reason for hiding this comment

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

@thiyyakat thanks for the PR! I have a few minor comments. PTAL, thanks.

@gardener-robot-ci-2
Copy link
Contributor

The pipeline-definition has been fixed.

Copy link

@shreyas-s-rao shreyas-s-rao left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2024
Copy link

gardener-prow bot commented Dec 21, 2024

LGTM label has been added.

Git tree hash: 1904a5bda09c3616f1a6398973a802ed18e5cb91

Copy link
Contributor

@rishabh-11 rishabh-11 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

gardener-prow bot commented Dec 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rishabh-11, shreyas-s-rao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 23, 2024
@gardener-prow gardener-prow bot merged commit b243713 into gardener:master Dec 23, 2024
7 checks passed
@thiyyakat thiyyakat deleted the enh/add-gosec branch December 24, 2024 05:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce gosec for Static Application Security Testing (SAST)
6 participants