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

Enable tsec as language service plugin #108682

Merged

Conversation

Siegrift
Copy link
Contributor

@Siegrift Siegrift commented Oct 14, 2020

This PR adds a tsec as language service plugin which enables showing potential security violations directly in the IDE.

There was one thing I needed to do (and not sure if it's just my issue) was that I needed to explicitly update tsec dependency, although there was no change in yarn.lock (it was probably just to invalidate the cache). Anyway, I recommend doing an explicit update of tsec using yarn upgrade tsec --latest.

@jrieken
Copy link
Member

jrieken commented Oct 26, 2020

@Siegrift The changes look good but tsec is now reporting too many errors 😄 Async imports are quite popular in our codebase and we have no plans of changing that. Would it be possible to teach tsec more than one error code and to able to suppress certain error codes (instead of files)?

@koto
Copy link

koto commented Oct 26, 2020

@Siegrift The changes look good but tsec is now reporting too many errors 😄 Async imports are quite popular in our codebase and we have no plans of changing that. Would it be possible to teach tsec more than one error code and to able to suppress certain error codes (instead of files)?

I filed google/tsec#15.

@Siegrift - as a workaround, it should be possible soon to silence disable a specific conformance rule, no?

@Siegrift
Copy link
Contributor Author

@jrieken @koto We have removed the rule from tsec. The changes are now available on latest master. We want it only internally and it was published by mistake :).

As Koto mentioned, we would like to improve the allowlist/suppression capabilities in the future.

@jrieken jrieken merged commit d404999 into microsoft:master Nov 9, 2020
@jrieken jrieken added the engineering VS Code - Build / issue tracking / etc. label Nov 9, 2020
@jrieken
Copy link
Member

jrieken commented Nov 27, 2020

fyi - we have reverted the changes from this PR as there have been too many "annoying errors". I'd say this is largely due to google/tsec#15. However, I am also unsure what the best way is to write code that support the lack of trusted types, e.g we assume that (parts of) our code don't always run in environments where trusted types are available/polyfiled and I am afraid we will always have errors for that

@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engineering VS Code - Build / issue tracking / etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants