-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: add support for .NET8 container-based web apps #792
Conversation
// ProjectDefinitionParser will have transformed projectDirectory to an absolute path, | ||
// and DockerFileName is static so traversal should not be possible here. | ||
// nosemgrep: csharp.lang.security.filesystem.unsafe-path-combine.unsafe-path-combine | ||
File.WriteAllText(Path.Combine(projectDirectory, DockerFileName), dockerFile); | ||
File.WriteAllText(Path.Combine(projectDirectory, Constants.Docker.DefaultDockerfileName), dockerFile); |
Check warning
Code scanning / Semgrep
String argument projectDirectory is used to read or write data from a file via Path.Combine without direct sanitization via Path.GetFileName. If the path is user-supplied data this can lead to path traversal. Warning
d946e35
to
c418ac6
Compare
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/net8 #792 +/- ##
===============================================
Coverage ? 61.46%
===============================================
Files ? 277
Lines ? 10659
Branches ? 1484
===============================================
Hits ? 6552
Misses ? 3566
Partials ? 541 ☔ View full report in Codecov by Sentry. |
61a32e6
to
abbbae4
Compare
abbbae4
to
95618f9
Compare
95618f9
to
70d08b4
Compare
Issue #, if available:
DOTNET-7201
Description of changes:
docker inspect
to access the environment variables in the container after we build it.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.