Skip to content

Dynamic sources and sinks#250

Merged
tmbrbr merged 3 commits into
SAP:mainfrom
leeN:custom_src_sink
Jan 29, 2025
Merged

Dynamic sources and sinks#250
tmbrbr merged 3 commits into
SAP:mainfrom
leeN:custom_src_sink

Conversation

@leeN

@leeN leeN commented Jan 24, 2025

Copy link
Copy Markdown
Collaborator

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.

@cla-assistant

cla-assistant Bot commented Jan 24, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@leeN

leeN commented Jan 24, 2025

Copy link
Copy Markdown
Collaborator Author

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.
Comment thread js/src/builtin/String.cpp Outdated
Comment thread js/src/builtin/String.cpp Outdated
@tmbrbr tmbrbr merged commit 2828e4a into SAP:main Jan 29, 2025
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