hex0punk / wally

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

limiter mode #47

Closed hex0punk closed 4 months ago

hex0punk commented 4 months ago

Replaces --continue-after main with a limiter mode as described in the readme. Various refactoring

dryrunsecurity[bot] commented 4 months ago

Hi there :wave:, @dryrunsecurity here, below is a summary of our analysis and findings.

DryRun Security Status Findings
Server-Side Request Forgery Analyzer :white_check_mark: 0 findings
Configured Codepaths Analyzer :white_check_mark: 0 findings
Secrets Analyzer :white_check_mark: 0 findings
Authn/Authz Analyzer :grey_exclamation: 1 finding
Sensitive Files Analyzer :white_check_mark: 0 findings
SQL Injection Analyzer :white_check_mark: 0 findings
IDOR Analyzer :white_check_mark: 0 findings

[!Note] :green_circle: Risk threshold not exceeded.

Change Summary (click to expand) The following is a summary of changes in this pull request made by me, your security buddy :robot:. Note that this summary is auto-generated and not meant to be a definitive list of security issues but rather a helpful summary from a security perspective. **Summary:** The provided code changes span multiple files in the Wally application, a static analysis tool for mapping function paths in Go code. The changes focus on improving the input validation, configuration options, and functionality of the call graph analysis performed by the tool. Key security-related highlights include: 1. **Improved Input Validation**: The changes in the `cmd/search.go` file add robust input validation for parameters like `format`, `searchAlg`, `callgraphAlg`, and `limiterMode`. This helps prevent potential security issues related to improper input handling. 2. **Enhanced Callgraph Analysis**: The code updates in `cmd/map.go` and `navigator/navigator.go` introduce more flexibility in the choice of callgraph algorithms and search strategies (BFS/DFS). This allows users to fine-tune the analysis to better suit their security requirements. 3. **Limiter Mode Configuration**: The addition of the `limiterMode` parameter in multiple files provides users with more control over the call graph analysis, which can help mitigate potential resource exhaustion or denial-of-service issues. 4. **Improved Documentation**: The changes to the `README.md` file enhance the documentation, providing more details on Wally's security-relevant features, such as HTTP/gRPC route mapping, fault tolerance analysis, and call path visualization. 5. **Callpath Mapping Enhancements**: The updates to the `navigator/navigator.go` and `wallylib/callmapper/callmapper.go` files improve the accuracy and performance of the call path mapping, which can be valuable for identifying security vulnerabilities in the analyzed applications. Overall, these code changes appear to be focused on improving the security-relevant functionality and configurability of the Wally application, making it a more powerful tool for application security analysis and research. **Files Changed:** 1. `cmd/search.go`: Adds input validation for various parameters, including `format`, `searchAlg`, `callgraphAlg`, and `limiterMode`. 2. `cmd/map.go`: Introduces the `limiterMode` parameter to control the behavior of the call graph analysis, and adds support for different callgraph and search algorithms. 3. `README.md`: Expands the documentation with more details on Wally's security-related use cases, filtering/limiting options, and path visualization features. 4. `navigator/navigator.go`: Refactors the `InitChecker` function, improves the `Run` method, and adds support for SSA-based callgraph generation. 5. `wallylib/callmapper/callmapper.go`: Introduces the `LimiterMode` type and the `Limiter` option to control the call mapping behavior, and enhances the handling of `defer` statements and `recover` calls.

Powered by DryRun Security