8000 Migrate Scanner / Parsers to ESM and @kubernetes/client-node v1.x by J12934 · Pull Request #3088 · secureCodeBox/secureCodeBox · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@J12934
Copy link
Member
@J12934 J12934 commented Jun 16, 2025

Description

Migrates all scanner and hooks to use ecma script modules for code im/exports.
This enables us to upgrade to the new @kubernets/client-node v1.x which only supports ESM (As many new modules do)
To be better able to test this, I've revamped / migrated the the local testing setup from makefiles to task files with (imo) way easier usage w/ automatic kind cluster / testing env setup.

for the hooks, I've reactivated the tests which were still in the global test/integration folder, these haven't been running for 2-3 years. There were also some generic integration tests which were also not in CI, these i've deleted because our normal test coverage for hooks and scanners have gotten so got that there is little point to them.

CI is reporting scanner status checks are missing, i've removed a duplicate space in the job name, that causes the confusion, everything should still be here.

Closes #2851
Closes #1158

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure that all your commits are signed-off and that you are added to the Contributors file.
  • Make sure that all CI finish successfully.
  • Optional (but appreciated): Make sure that all commits are Verified.

@J12934 J12934 added this to the v5.0.0 milestone Jun 16, 2025
@J12934 J12934 self-assigned this Jun 16, 2025
@netlify
Copy link
netlify bot commented Jun 16, 2025

Deploy Preview for docs-securecodebox ready!

Name Link
🔨 Latest commit ce2db15
🔍 Latest deploy log https://app.netlify.com/projects/docs-securecodebox/deploys/68765e28575aaa0008b482ec
😎 Deploy Preview https://deploy-preview-3088--docs-securecodebox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Weltraumschaf Weltraumschaf moved this from Triage to In Progress in secureCodeBox Jun 17, 2025
@J12934 J12934 marked this pull request as ready for review July 11, 2025 11:59
@J12934 J12934 moved this from In Progress to To Review in secureCodeBox Jul 11, 2025
@github-project-automation github-project-automation bot moved this from To Review to Reviewer Approved in secureCodeBox Jul 15, 2025
J12934 added 18 commits July 15, 2025 15:56
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Nuclei parser has no dependencies, having them is not required and doesn't do anything

Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Linking is done using the parser-sdk local file link from the scanners/ directory

Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
J12934 added 26 commits July 15, 2025 15:56
They aren't integrated in ci and the setup for them is unclear :/
They haven't run in over 3 years and apparently nobody misses them. All these scenarios are already covered by some of our normal hooks so these were always more basic tests.
This was just testing if the secret is there, overkill to do that in js. kubectl get secret <name> will fail if no resource exists with that name
Seems pretty much unused now.
Linter would be good to bring back but doesn't work in it's current form :(
Migrate helm test running in ci to task
wasn't causing problems as bun can handle it, but its inconsistent
…ind, kubectl and so on to avoid rate limits from github
Ensures that the jobs that are working keep running to easier identify if one of them is broken
overlooked this earlier and was confused why mocking was even working
Prior versions might not support all required features
cleanup should always run

Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@J12934 J12934 merged commit ce2db15 into secureCodeBox:main Jul 15, 2025
48 of 49 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer Approved to Done in secureCodeBox Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Fix code for @kubernetes/client-node 1.0.0 🔧 Maintenance: Move hook integration tests to hook directories

2 participants

0