hex0punk / wally

Function callpath mapping analysis tool for Go
Mozilla Public License 2.0
28 stars 0 forks source link

Match filtering #64

Closed hex0punk closed 2 months ago

dryrunsecurity[bot] commented 2 months ago

DryRun Security Summary

The pull request enhances the analysis capabilities of the indicator, wallylib, and navigator packages, including the addition of a MatchFilter field in the Indicator struct, the introduction of a FuncDecl struct and the expansion of the FuncInfo struct in wallylib, and the integration of SSA analysis and caching of variables in the Navigator struct, which can potentially improve the ability to identify and track security-sensitive functions and their usage context.

Expand for full summary
**Summary:** The code changes in this pull request focus on enhancing the analysis capabilities of the `indicator`, `wallylib`, and `navigator` packages. The key changes include the addition of a new `MatchFilter` field in the `Indicator` struct, the introduction of a `FuncDecl` struct and the expansion of the `FuncInfo` struct in `wallylib`, and the integration of SSA (Static Single Assignment) analysis and caching of variables in the `Navigator` struct. From an application security perspective, these changes are interesting as they can potentially improve the ability to identify and track security-sensitive functions and their usage context. The `MatchFilter` field, for example, could be used to filter and focus the analysis on specific functions or code areas that are considered security-critical. The additional context provided by the `EnclosedBy` field in `FuncInfo` and the call path resolution in the `Navigator` can also help security analysts better understand the application's control flow and identify potential attack vectors. Overall, these changes appear to be focused on enhancing the functionality and flexibility of the affected packages, which can have positive implications for application security analysis and monitoring. However, it's important to review the actual implementation and usage of these features to ensure that they do not introduce any new security vulnerabilities, such as improper input validation or access control issues. **Files Changed:** 1. `indicator/indicator.go`: The code adds a new `MatchFilter` field to the `Indicator` struct, which can be used to define a filter for determining if an indicator should be matched or not. This change is interesting from a security perspective, as the `MatchFilter` field could potentially be used to introduce security vulnerabilities if not implemented securely. 2. `wallylib/core.go`: The changes in this file introduce a new `FuncDecl` struct and expand the `FuncInfo` struct to include an `EnclosedBy` field. These changes appear to be focused on improving the analysis capabilities of the `wallylib` library, which could have positive implications for security-related analysis and monitoring. 3. `navigator/navigator.go`: The changes in this file focus on enhancing the functionality of the `Navigator` struct, including the ability to track enclosing functions, resolve function parameters, integrate with SSA analysis, cache global and local variables, and solve call paths. These improvements can provide more detailed insights into the application's structure and behavior, which can be valuable for application security assessments.

Code Analysis

We ran 9 analyzers against 3 files and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

:green_circle: Risk threshold not exceeded.

View PR in the DryRun Dashboard.