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

Dynamic sources and sinks #250

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Dynamic sources and sinks #250

merged 3 commits into from
Jan 29, 2025

Conversation

leeN
Copy link
Collaborator

@leeN leeN commented Jan 24, 2025

Sometimes, it is helpful to taint specific values via code rewriting. This was possible before, but String.tainted() had a hardcoded source name. This PR aims to resolve this and add the same for sinks.

Required:

  • Allow to specify a custom source name
  • Add custom sinks via exposed JS API.

Copy link

cla-assistant bot commented Jan 24, 2025

CLA assistant check
All committers have signed the CLA.

@leeN
Copy link
Collaborator Author

leeN commented Jan 24, 2025

So, both dynamic sources and sinks are supported now. This works, for example, by doing foxhound_sink(String.tainted("foo", "x"), "y") , which results in Tainted flow from x into y!.

@leeN leeN changed the title WIP: Custom sources and sinks Dynamic sources and sinks Jan 24, 2025
leeN added 2 commits January 27, 2025 12:32
Added an option to specify a custom source name via `String.tainted()`.

This allows us to define our own sinks when, e.g., doing dynamic code
rewriting via babel.
Added support to dynamically insert custom sinks by inserting
`foxhound_sink(str, name)` calls.
js/src/builtin/String.cpp Outdated Show resolved Hide resolved
js/src/builtin/String.cpp Outdated Show resolved Hide resolved
@tmbrbr tmbrbr merged commit 2828e4a into SAP:main Jan 29, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants