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

noSecrets reports string with spaces. #3861

Closed
1 task done
Conaclos opened this issue Sep 12, 2024 · 1 comment
Closed
1 task done

noSecrets reports string with spaces. #3861

Conaclos opened this issue Sep 12, 2024 · 1 comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Enhancement Status: Improve an existing feature

Comments

@Conaclos
Copy link
Member

Conaclos commented Sep 12, 2024

Environment information

Main

What happened?

The following code is reported by noSecrets.

export const C = "\nconst DEFAULT_CONFIG = /* @__PURE__ */ bare.Config({})\n";

Playground

Expected result

The rule could exclude strings that contain spaces.

EDIT: Finally, I am not sure how to fix this. Because some secrets can be inside a spaced string.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 12, 2024
@Conaclos Conaclos changed the title 🐛 noSecrets reports string with sapces. noSecrets reports string with spaces. Sep 12, 2024
@Conaclos Conaclos added S-Enhancement Status: Improve an existing feature and removed S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 12, 2024
@SaadBazaz
Copy link
Contributor

Will have to study original no-secrets code better. Does it offer this within-string checking?

Because if remove the feature of checking secret within a larger string, we can easily fix this problem with spaces heuristic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Enhancement Status: Improve an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants