Comments (1)
I have investigated ssa.UnOp
instructions and I believe the best we can do for now is to keep visiting the Operands
. Under the current approach I don't see a straightforward way to handle the following cases without visiting the Operands
. I think this would be easy to handle with an interpretation-based approach, however.
First, consider this case:
func TestArrOfPointersIsTainted(s core.Source, arr [1]*string) {
colocateArrOfPointers(s, arr)
core.Sink(arr) // want "a source has reached a sink"
}
The relevant portion of the SSA graph is:
We need to traverse to the Operand
(in this case, t1
) when coming from the Call
, because otherwise we can't get to the sink
.
Also consider this case:
func TestSanitizedSourceDoesNotTriggerFindingWhenTypeAsserted(s *core.Source) {
sanitized := core.Sanitize(s)[0].(*core.Source)
core.Sinkf("Sanitized %v", sanitized)
}
The relevant portion of the SSA graph is:
We need to traverse to the Operand
in order to find the Sanitizer
. Otherwise, the Source
produced by the TypeAssert
is considered unsanitized. This could be seen as a failure of the isProducedBySanitizer
function. I have opened an issue here: #237.
from go-flow-levee.
Related Issues (20)
- go core.Sink(source) does not create report
- Handle methods on non-struct source types HOT 2
- Proposal for testdata convention - spoof source root with go.mod to assist IDEs HOT 6
- Improve error reporting when config is missing HOT 2
- Revisit tests involving source interface propagation HOT 3
- Enable exclusion of analysis by filename (rather than only package)
- Improve handling of suppression comments in nested calls
- Implement understanding of formatting verbs
- Support "reverse" propagation through Store instructions
- Determine how/whether we should explicitly enumerate functions that don't propagate taint
- Refine handling of Defer and Go instructions.
- false negative when analyze the url parameters about gin framework HOT 5
- Handle standard library functions in the analysis engine HOT 1
- handle the unify-by-value semantics in the EAR pointer analysis
- Use more advanced call graph in inter-procedural analysis
- Separate the unit-tests for the two taint analyses
- Stack Overflow in internal/pkg/sourcetype/sourcetype.go HOT 3
- `utils.Dereference` can get stuck in an infinite loop
- Generics are not supported by analyzers
- Crashes when analyzing Go 1.19 standard libraries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-flow-levee.