Ballerina-lang: [Taint Analysis - Proposal] Have a way to mark a client as untainted, where all remote actions would then be considered to return untainted data

Created on 2 Feb 2020  路  2Comments  路  Source: ballerina-platform/ballerina-lang

Description:
$title.

Basically the requirement is that even if the remote methods are marked to be returning tainted values, if the client itself is marked as trusted, the return values should also be considered as trusted.

Based on https://github.com/ballerina-platform/ballerina-lang/issues/20530#issuecomment-571444592

AreCompiler TeaCompilerFE TypProposal

Most helpful comment

We can make this work, iif client is final. Otherwise, static code analysis will not work.

All 2 comments

We can make this work, iif client is final. Otherwise, static code analysis will not work.

I think we can make this work, as @hasithaa said the final constraint needs to be there.

On top of that final guarantee, we need to have another guarantee that this client method does not touch any other data apart from the data coming from the client. I.E. this method can't read a file and somehow combine that information with the information coming from the client.

Analyzing this is also possible, actually, we already do that, that's how we produce that _return type is not annotated error_. And then we need to extend the taint table to track that this method may or may not produce a tainted value on its own.

@ayomawdb what do you think about this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shalithasuranga picture shalithasuranga  路  3Comments

SupunS picture SupunS  路  4Comments

ThisaruGuruge picture ThisaruGuruge  路  3Comments

mgabalins picture mgabalins  路  3Comments

pubudu91 picture pubudu91  路  3Comments