Skip to content

Seed stdlib sinks for C#, Rust, Elixir, C, C++, Kotlin, Scala, Swift, Dart, Perl, Lua#32

Merged
andrew merged 1 commit intomainfrom
seed-language-sinks-tier2
Apr 11, 2026
Merged

Seed stdlib sinks for C#, Rust, Elixir, C, C++, Kotlin, Scala, Swift, Dart, Perl, Lua#32
andrew merged 1 commit intomainfrom
seed-language-sinks-tier2

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Apr 11, 2026

188 sinks across the next tier of 11 languages, building on the six from #24.

C# (36) gets the .NET deserialization surface (BinaryFormatter, LosFormatter, NetDataContractSerializer, JavaScriptSerializer with TypeResolver), XXE via XmlDocument/XmlTextReader, SqlCommand injection, and Assembly.Load/Activator.CreateInstance reflection. C (27) and C++ (17) get buffer overflow classics (gets, strcpy, sprintf, scanf %s), format string sinks (printf with caller format), tmpnam/mktemp TOCTOU, and the memory misuse patterns (double-free, unchecked alloca). Elixir (17) gets Code.eval_string, :os.cmd/:erlang interop, atom exhaustion via String.to_atom, and :erlang.binary_to_term without :safe. Kotlin (12) and Scala (11) inherit JVM surface with language-specific entry points (Scala's string-to-process implicit .!, Kotlin's kotlin.io.path). Swift (16) gets NSKeyedUnarchiver deserialization, NSPredicate/NSExpression injection, WKWebView XSS, and XMLParser XXE. Perl (15) gets two-arg open with | pipe injection and Storable::thaw deserialization. Lua (11) gets loadstring/load and notes that the debug library should be disabled in sandboxes. Rust (13) is mostly unsafe pointer operations plus Command::new.

17 of 53 language defs now carry sinks, covering the ecosystems where projects actually appear in practice. The remaining 36 (Ada, COBOL, Gleam, Roc, etc) are left for later.

Closes #29

… Dart, Perl, Lua

188 sinks across the next tier of languages. C# gets the .NET
deserialization surface (BinaryFormatter, LosFormatter,
NetDataContractSerializer, JavaScriptSerializer with TypeResolver) plus
XXE, SQL injection via SqlCommand, Assembly.Load. C and C++ get the
classic buffer overflow functions (gets, strcpy, sprintf, scanf %s),
format string sinks (printf with caller format), and the tmpnam/mktemp
TOCTOU race. Elixir gets Code.eval_string, the :os.cmd/:erlang
interop surface, atom exhaustion via String.to_atom, and
:erlang.binary_to_term without :safe. Kotlin and Scala inherit Java's
JVM surface but get their own language-specific entry points
(scala.sys.process string-to-process implicit, kotlin.io.path). Swift
gets NSKeyedUnarchiver deserialization, NSPredicate/NSExpression
injection, WKWebView.loadHTMLString XSS, and XMLParser XXE. Perl gets
the two-arg open and | pipe injection. Lua gets loadstring/load and
the debug library that should be disabled in sandboxes.

17 of 53 language defs now carry sinks, covering the ecosystems where
projects actually appear in practice.

Closes #29
@andrew andrew merged commit cb4b39f into main Apr 11, 2026
5 checks passed
@andrew andrew deleted the seed-language-sinks-tier2 branch April 11, 2026 18:14
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.

Seed stdlib sinks for the next tier of languages

1 participant