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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tmbb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tmbb
                    <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" data-username="Asd" data-post="10" data-topic="75201">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Thats a security and maintenance nightmare of every person responsible for dependency management.</p>
</blockquote>
</aside>
<p>I agree. Still, it is very convenient and it’s definitely the right tradeoff in my case. Loads of Elixir libraries have ended up picking the same tradeoff (e.g. everything that uses RustlerPrecompiled, the default packages for Phoenix build-time tooles, etc.). I don’t remember if I have documented this yet, but you can use a local executable of <code>z3</code>, which you can install from wherever you want. However, I haven’t implemented a conditional test on this option, so the external z3 executable is downloaded anyway… Anyway, this is a problem I can solve in a future version.</p>
<aside class="quote no-group" data-username="Asd" data-post="10" data-topic="75201">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>The solution is to remove the vulnerable code and everything regarding this download-during-compilation approach and leave the binary download instructions in the README.</p>
</blockquote>
</aside>
<p>This is exactly what I don’t want from an Elixir package. One of the things taht brought me to Elixir is the extremely hands off build tool (i.e. Mix), where you add stuff to a file and things <em>just work</em>. For the default configuration of this library, I want things to <em>just work</em> and security takes a back step. There is <em>always</em> a tradeof between security and convenience, and I am unappologetic going all the way to convenience for this specific library. I do respect your different tradeoffs.</p>
<p>So, I will NOT disable the possibility of downloading the Z3 binary from github, but I would certainly welcome a PR to do the following: 1) document the config options in a centralized place, 2) add a <code>download_z3_executable: boolean()</code> flag or some other equivalent option that disables the binary download, 3) adding a list of whitelisted hashes/signatures/whatever for the downloads so that the source can be checked (although if you’re not compileing Z3 itself, are you sure the hashes are safe? taking the hashes from the same website that hosts the code a bit too “security theatrical” for my tastes).</p>
<p>And if you allow me, I will go on a small rant… I am not sure that downloading a package from Hex is safer than downloading a release file from GitHub (can’t an attacker compromise the code hosted on Hex.pm? Can’t the Hex.pm team compromise it themselves?). It’s very easy to get all worked up with security stuff and supply chain attacks, but ultimately some form of trust is required, and the hard thing is to put that trust in the right place… IMO modern software needs to be seen as fundamentally insecure, especially when written in a high-level language like Elixir: you have elixir, which is compiled to erlang, which is interpreted by a large C program (the BEAM, which famously had/has a very serious SSL bug: <a href="https://www.mallory.ai/stories/019f2444-89c8-7a6c-8da0-6e1e6f7e434e" class="inline-onebox" rel="noopener nofollow ugc">Erlang/OTP ssl flaws let unauthenticated attackers crash DTLS and TLS 1.3 listeners | Mallory</a>), which runs on top of a huge multi-language program (the OS) which runs in some hardware you’ve never seen that lives on a server farm handled by people you’ve never met… And, among all of this, we’re worried about a small compile-time script (that runs on the build machine and not necessarily on the production machine) that downloads a well known binary from a rather secure source repository?</p>
<p>The point of this rant is not to belittle your security concerns about my package, which I do respect. It’s just a somewhat nihilistic thought about the current state of software development: we have build a tower so high that no one can see the foundations. And I’m contributing to the problem by writing <em>yet another wrapper</em> to <em>yet another language</em> for an incomprehensibly complex piece of software (Z3) which I barely understand while trusting its outputs.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="391297" 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/zee3-bindings-to-the-z3-theorem-prover/75201/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-391297" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="391297"
                     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="391304" data-post-id="391304">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Asd" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Asd
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It is not about convenience vs security, it is a false dilemma. It is about inconvenient and insecure vs convenient and secure. Downloading binaries from internet during compilation has these problems:</p>
<ol>
<li>Compilation now fails as often as github does (which is often)</li>
<li>Makes it impossible to build the program without internet access.</li>
<li>Makes it impossible to cache this binary in order to speed up build time.</li>
<li>Doesn’t work for cross-compiled scenarios (which is an unexpected thing, because vanilla compilation generates BEAM files which are architecture and system agnostic)</li>
<li>Has security flaws in implementation, allowing for RCE via DNS poisoning and very basic supply-chain attacks</li>
</ol>
<p>Four out of five problems I’ve listed are problems with convenience. I think that users of your library can handle using any package manager or containerization software in order to just curl and cache the binary in their build script. It is literally one or two lines of code in any build system.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="391304" 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/zee3-bindings-to-the-z3-theorem-prover/75201/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-391304" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="391304"
                     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="391400" data-post-id="391400">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tmbb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tmbb
                    <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>Clearly we have very different definitions of what <em>convenience</em> is.</p>
<p>This is maybe because I am not a professional software developer and only write code to solve my own (and my business’s) problems (although I do work with some professinal devs for the more “professional” stuff), but the workflows you describe seem positively ghastly to me… As a possible consumer of this library, the idea that I would have to download any kind of software outside of what Mix already does for me, make sure it’s added to the path, etc. is a very, very big inconvenience. I envision this library as being useful for someone who wants to do some logic programming from Elixir, not necessarily someone who needs a super safe setup for production deployment (and you can get that safety once I implement the flags to avoid downloading the binary). The user I have in mind doesn’t need to know anyting about containerization.</p>
<p>To me, convenience is not having to leave the comfortable world of a <code>mix.exs</code> file and have everything work automatically and in which stuctured data is passed in a sane way between functions or sent as a message through processes without (god forbid!) ever having to use something like a unix shell where bash scripts receive and output somewhat free form plain text that is sent to some other bash scripts or weird unix utility that people insist on using as a library when the API is actually much closer to that of a command line application. To you, using the OS outside the BEAM is convenience… To me, using the OS outside the BEAM and integrate it with the BEAM is the definition of inconvenience…</p>
<p>I do acknowledge your arguments, and I will work to make the applications usable without downloading anything at compile time, because I’d like to have as many people using (and contributing!) to this library as possible, but keep in mind that our notions of what is convenient are <em>very</em> different.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="391400" 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/zee3-bindings-to-the-z3-theorem-prover/75201/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-391400" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="391400"
                     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>