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

Generated methods should have DefaultDllImportSearchPathsAttribute #41

Closed
clairernovotny opened this issue Jan 21, 2021 · 2 comments · Fixed by #176
Closed

Generated methods should have DefaultDllImportSearchPathsAttribute #41

clairernovotny opened this issue Jan 21, 2021 · 2 comments · Fixed by #176
Assignees
Labels
enhancement New feature or request

Comments

@clairernovotny
Copy link
Member

This is a security recommendation that is flagged by the built-in .NET analyzers

@AArnott
Copy link
Member

AArnott commented Jan 22, 2021

Interesting idea to apply them to each individual method. I didn't even realize that was possible before you suggested it.

Why not just add an assembly-level attribute?

@clairernovotny
Copy link
Member Author

Here's why: a user may not know the right value or even that they need to add it. We know the right values for these as they're windows api. Let's err on the side of secure-by-default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants