Skip to content
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

Implement a general purpose data flow analyser for Go (and Kotlin) #1242

Open
alecthomas opened this issue Apr 12, 2024 · 0 comments
Open

Implement a general purpose data flow analyser for Go (and Kotlin) #1242

alecthomas opened this issue Apr 12, 2024 · 0 comments
Labels
advanced Requires advanced understanding of FTL internals

Comments

@alecthomas
Copy link
Collaborator

alecthomas commented Apr 12, 2024

As we extend the system to support different kinds of resources, the need to be able to trace the usage of those values becomes increasingly necessary. Today we have config and secrets, whose usage we are able to detect only when the handle itself is used in a verb. eg.

var secret = ftl.Secret[string]("mySecret")

//ftl:export
func MyVerb(ctx context.Context, req Req) (Resp, error) {
  print(secret.Get()) // We can detect this usage.
  // ...
}

However if the secret value is retrieved at its global declaration point instead, we lose the ability to detect its usage:

var secret = ftl.Secret[string]("mySecret").Get()

//ftl:export
func MyVerb(ctx context.Context, req Req) (Resp, error) {
  print(secret) // We can't detect this usage currently.
  // ...
}

This will become more important when we add support for PII data, and database field tracing.

@github-actions github-actions bot added the triage Issue needs triaging label Apr 12, 2024
@alecthomas alecthomas changed the title Implement a general purpose data flow analyser for Go Implement a general purpose data flow analyser for Go (and Kotlin) Apr 12, 2024
@deniseli deniseli removed the triage Issue needs triaging label Apr 12, 2024
@alecthomas alecthomas added the advanced Requires advanced understanding of FTL internals label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced Requires advanced understanding of FTL internals
Projects
None yet
Development

No branches or pull requests

2 participants