<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="387161" data-post-id="387161">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="code-of-kai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/code-of-kai/120/40203_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  code-of-kai
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks! Fireship just published a video on a massive supply chain attack:</p>
<p><strong><a href="https://www.youtube.com/watch?v=piah4fV_o2Q" rel="noopener nofollow ugc">A rich hacker just penetrated 31 WordPress plugins…</a></strong></p>
<p>I am hoping to get a lot of critical feedback from the Elixir community on Vet - I think it can be a key ecosystem advantage for Elixir to be highly resistant to supply chain attacks.</p>
<p>So please: attack Vet! Help me make it stronger!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387161" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-387161" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387161"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="387162" data-post-id="387162">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="code-of-kai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/code-of-kai/120/40203_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  code-of-kai
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="hauleth" data-post="10" data-topic="74896">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>I can use <code>:socket</code> module without any warnings · Issue <span class="hashtag-raw">#9</span> · code-of-kai/vet · GitHub</p>
</blockquote>
</aside>
<p>I see you provided the list below. Great! My preference is that its given on this thread in some fashion, as you have done, but otherwise what is most convenient to you. I appreciate the critical feedback, hauleth.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387162" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-387162" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387162"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="387177" data-post-id="387177">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="code-of-kai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/code-of-kai/120/40203_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  code-of-kai
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for filing <span class="hashtag-raw">#4</span> through <span class="hashtag-raw">#9</span>. All six were real gaps. Fixes are live in commit 9d8d621.</p>
<p>The reasoning behind each:</p>
<ul>
<li><span class="hashtag-raw">#4</span> <strong>(<code>:compile.file/forms</code>):</strong> the code_eval check only covered Elixir’s <code>Code.*</code> family, which left the Erlang <code>:compile</code> module as a free bypass for dynamic code execution. The threat is identical, so the five main entry points now fire with the same severity as <code>Code.eval_string</code>.</li>
<li><span class="hashtag-raw">#5</span> <strong>(<code>File.open</code>):</strong> the function list had read/write/stream but not open. That meant the pipe <code>File.open!(path) |&gt; IO.read(:eof)</code> was invisible, which is worse than the direct <code>File.read!</code> form it was presumably bypassing.</li>
<li><span class="hashtag-raw">#6</span> <strong>(Erlang <code>:file</code>):</strong> same attack, different wrapper. Elixir’s <code>File.*</code> ultimately calls <code>:file.*</code>, so checking one without the other just moves the evasion one character to the left.</li>
<li><span class="hashtag-raw">#7</span> <strong>(<code>:gen_tcp.listen</code>):</strong> I had written the check with exfiltration as the threat model, which is why only <code>connect</code> was there. But a malicious package opening a listener for command-and-control is the same class in reverse, so listen, accept, and controlling_process now fire too.</li>
<li><span class="hashtag-raw">#8</span> <strong>(UDP and SCTP):</strong> I simply had not considered them. Supply-chain attacks don’t owe us the courtesy of using TCP.</li>
<li><span class="hashtag-raw">#9</span> <strong>(<code>:socket</code>):</strong> the low-level OTP socket API lets you do everything <code>:gen_tcp</code>, <code>:gen_udp</code>, and <code>:ssl</code> do while sidestepping all three. Added as a wildcard, because on a library the mere use of <code>:socket.*</code> is already anomalous.</li>
</ul>
<p>The deeper issue your reports exposed: the detection was whatever patterns I happened to think of, not a reasoned map of the actual attack surface. A targeted unit test for each pattern couldn’t catch the class of bug you found, because the failure mode is a silently absent pattern, not a broken one. So I also added three layers that together bound the detection surface exactly.</p>
<p>First, a coverage sweep test that drives every declared pattern through the check engine. If someone removes or mistypes an entry in the check module, the test fails loudly instead of quietly shrinking what gets detected.</p>
<p>Second, a symmetric equivalence assertion: each check module now exposes its target list, and the test asserts declared-set equals swept-set. Adding a new pattern without also adding a sweep row now fails, because the other direction would go uncovered. That assertion caught its first regression the moment I wrote it, flagging 10 <code>:file</code> functions I had declared but forgotten to sweep.</p>
<p>Third, a StreamData precision property. For each of the three checks, 100 random <code>{module, function}</code> pairs are generated from a pool that excludes every declared pattern, and the test asserts zero findings. 300 adversarial inputs per run. The sweep proves recall, this proves precision, the equivalence keeps them aligned.</p>
<p>If you find more, tell me. Curious what you try next.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387177" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-387177" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387177"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="387179" data-post-id="387179">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hauleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/120/18942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hauleth
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I have some:</p>
<ul>
<li><code>:ssh</code> and <code>:ssh_sftp</code> aren’t checked - I can freely open some connection to remote server or open remote shell</li>
<li><code>:ftp</code> is not protected, so I can download or upload any data I want</li>
<li><code>:httpd</code> is not checked, so the second “hidden” HTTP server can be ran</li>
<li>I can use <code>:prim_file</code> module - while it isn’t public API, I think that attacker will not give a damn about breaking API (and once upon a time I needed genuinely use that module, because “stable” API do not provide such functionality)</li>
<li>I can run any external executable using <code>Mix.shell().cmd(…)</code> (which is by the way an approach that <em>should</em> be used in Mix tasks)</li>
<li><code>:erlang.open_port</code> is free to be used</li>
<li>I can use <code>Tesla</code> or <code>hackney</code> or other HTTP client just fine, the same with sockets where I can use <code>procket</code> library to open any unsafe socket</li>
<li>I can use <code>defdelegate</code> to circumvent any function call check<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule TestMod do
  defdelegate foo(str), to: String, as: :to_atom

  def convert(str) do
    foo(str)
  end
end
</code></pre>
</li>
<li>While I cannot use <code>apply</code> I can still write function like <code>def call(mod), do: mod.connect(~c"i.will.not.to.anything.promise.dev", [])</code> and be able to connect to remote server</li>
<li>I can use <code>def "$handle_undefined_function"(name, args)</code> to do more nasty things</li>
<li>I can use <code>:inet_res</code> functions to leak data by sending prepared DNS requests containing private data</li>
<li>I can use <code>:epp.scan_file</code> to read file content (it will be mangled, but in many cases it may be possible to extract required data from there</li>
</ul>
<p>I appreciate your effort, the problem I see is that Erlang VM is just unsafe VM and I do not believe that there is a way to do it in a way, that will not create false sense of security. I strongly believe that tool that provide false sense of security is worse option than no tool at all.</p>
<p>What this tool currently provide is more of a sanity check against accidental data leakage than checking against actually malicious party trying to obscure their actions. It may be useful anyway, just not as a defence against malicious library providers (I deliberately do not use term “supply chain”, as <a href="https://lobste.rs/s/cxwidw/no_one_owes_you_supply_chain_security#c_bgvpak" rel="noopener nofollow ugc">open source authors aren’t “supply chain”</a>).</p>
<p>If you want to secure against actively malicious parties, then:</p>
<ol>
<li>You need to think as malicious attacker. If someone wants to hide what they are doing, they for sure will not fall into trap where you can simply use “<code>grep</code> on steroids” to see that it is doing bonkers stuff</li>
<li>In my opinion if someone want to hide what they are doing, then without higher level sandbox (either Erlang VM level or OS level) you cannot really catch that. This library can be circumvented in super simple way already - just write some Erlang module in your project, and you are safe to go and do anything, as it scans only Elixir code.</li>
</ol> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387179" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-387179" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387179"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="387180" data-post-id="387180">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="martosaur" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/martosaur/120/38317_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  martosaur
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="hauleth" data-post="15" data-topic="74896">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>In my opinion if someone want to hide what they are doing, then without higher level sandbox (either Erlang VM level or OS level) you cannot really catch that.</p>
</blockquote>
</aside>
<p>This sounds like a decent use case for LLMs? We definitely can’t get enough human eyes to audit Hex packages, but AI eyes are well within reach, although not free. It would make total sense for companies to run some sort of audit like that on CI privately, but maybe there’s a room for that at the ecosystem level <img src="https://forum.elixirforum.com/images/emoji/apple/thinking.png?v=15" title=":thinking:" class="emoji" alt=":thinking:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387180" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-387180" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387180"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="387181" data-post-id="387181">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hauleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/120/18942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hauleth
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="martosaur" data-post="16" data-topic="74896">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/martosaur/48/38317_2.png" class="avatar"> martosaur:</div>
<blockquote>
<p>This sounds like a decent use case for LLMs?</p>
</blockquote>
</aside>
<p>That falls very much under</p>
<aside class="quote no-group" data-username="hauleth" data-post="15" data-topic="74896">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>I strongly believe that tool that provide false sense of security is worse option than no tool at all.</p>
</blockquote>
</aside>
<p>There are approaches for “community driven reviews” like <a href="https://github.com/crev-dev/cargo-crev" rel="noopener nofollow ugc">Crev</a>, however these also have trust issues - how to implement a library of trusted reviews.</p>
<p>Unfortunately that isn’t a simple thing to do, because that is not technical challenge, but social one.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387181" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-387181" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387181"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="387186" data-post-id="387186">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="martosaur" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/martosaur/120/38317_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  martosaur
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Fair point. Although I think at this point it’s worth taking a closer look at how false the sense of security can be. One extreme is “grep on steroids”, which we know is pretty false because we know exactly how to bypass it. Another extreme is deep human review, which is probably the best audit one can get, but it also can be classified as false: humans are prone to error and either have limited knowledge (if you do the review yourself) or rely on trust (if review is done by someone else).</p>
<p>My intuition is that Opus will be quite good as spotting suspicious stuff that doesn’t belong to a library. I would put it a lot closer to humans on a scale of false sense of security.</p>
<p>How hard do you think it is to obfuscate malicious code in a way that would pass security review from an LLM?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387186" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-387186" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387186"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="387187" data-post-id="387187">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="martosaur" data-post="18" data-topic="74896">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/martosaur/48/38317_2.png" class="avatar"> martosaur:</div>
<blockquote>
<p>How hard do you think it is to obfuscate malicious code in a way that would pass security review from an LLM?</p>
</blockquote>
</aside>
<p>IMO the mere fact of trying to obfuscate it would make it easier to flag. The hacker must be a godlike genius to be able to have completely innocuous code that passes cursory review.</p>
<p>…And even then, one prompt like “This library must strictly adhere to the activities X and Y. Do a thorough audit for outliers” will give you 80-90% certainty that even the innocuous genius insecure code would be found.</p>
<p>I, like <a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a>, don’t have <em>complete</em> trust in LLMs (and nobody should) but I’ve also seen Opus do stuff that’s close to magic and I have gradually learned to guide it in a way that makes the magic more likely to be produced.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387187" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-387187" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387187"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="387209" data-post-id="387209">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hauleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/120/18942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hauleth
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="19" data-topic="74896">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>IMO the mere fact of trying to obfuscate it would make it easier to flag. The hacker must be a godlike genius to be able to have completely innocuous code that passes cursory review.</p>
</blockquote>
</aside>
<p>It often does not. I do not have access to sensible AI reviewer, but I think it could hiccup on code that looks innocent to people, but is malicious when used together. For example a Vet (and I think neither will any other AI agent) will see anything particularly wrong in using <code>:ranch_tcp.listen</code> or stuff like that. Especially when you will do that across different libraries.</p>
<p>Obfuscation of the attack do not mean that the code is less readable, it makes code flow harder to comprehend.</p>
<p>One of the possible vectors of the obfuscation I see is that someone will write code, where in <code>mix.exs</code> they will do “innocent” mistake in form of:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp elixirc_paths(:dev), do: ["lib"]
defp elixirc_paths(_), do: ["lib", "test/support"]
</code></pre>
<p>And now they will put malicious code in <code>test/support/file_used_only_in_tests_i_promise.ex</code>. Now it will contain module named for example <code>NoHarmPromise.FooControler</code> while in <code>lib/no_harm_promise/foo_controller.ex</code> they will have <code>NoHarmPromise.FooController</code>. In their router they did another silly mistake and they have written <code>post "/nothing-imporant", FooControler</code>. But now, for both the LLM as well as human, it may look like there is no harm really. Code compiles, tests passes, but the code has slightly “unexpected” behaviour.</p>
<hr>
<p>It is getting off topic there, but I have tried to assess known and intentionally malicious code from <a href="https://web.archive.org/web/20260307080349/http://www.underhanded-c.org/" rel="noopener nofollow ugc">Underhanded C Competition from 2015</a> (so any LLM should have it in their learning corpus). It failed terribly there in both Gemini as well as ChatGPT (I do not have accounts for other LLMs so I didn’t bother). Both have noticed some small problems (like <code>NaN</code> handling or potential division by 0), but none catches the elephant in the room.</p>
<p>I do not really believe, that with determined enough attacker (who also had access to all these tools) it could be avoided. Especially with Jia Tan-level of dedication to prepare the attack.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="387209" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/vet-elixir-dependency-security-scanner/74896/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-387209" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="387209"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>