-
Notifications
You must be signed in to change notification settings - Fork 561
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
dotnet: consider emitting namespace, class, method, and field/property names referenced by an assembly #1013
Comments
we can then write rules like: rule:
meta:
name: manipulate files in dotnet
namespace: host-interaction/file-system
scope: function
features:
- and:
- class: System.IO.File |
Do we need the namespace field for (2)? Can you think of rules where we would use that in rules right now? |
Including the namespace for imported classes is probably overkill. However, including user-defined namespaces may facilitate malware family detection. I don't have a specific example for the latter. |
I propose the following:
|
Ah, yeah, that could be neat to detect on namespaces. For simplicity I'd then say we emit namespace, class, method, and property/field names for all classes?! |
I agree; we should keep it simple by extracting the same for all classes. so, emit the following for all classes referenced at file and function scope:
see #939 for discussion on emitting references to properties/fields. |
this may require introducing new features, including:
see #939 for unsure if we need |
(1) e.g. emit the following for
System.IO.File::OpenRead
:(2) be more explicit to avoid FPs resulting from naming conflicts, e.g.:
and for properties, e.g. (more discussion in #939):
I like option 2 the best, and I think this would apply to both file and function scopes and both internal and external references.
The text was updated successfully, but these errors were encountered: