<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aurum Revenue</title>
    <description>The latest articles on DEV Community by Aurum Revenue (@aurum_revenue).</description>
    <link>https://dev.to/aurum_revenue</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4257212%2F9f6bb3cd-7d42-48b2-9cdf-51a429748aa6.png</url>
      <title>DEV Community: Aurum Revenue</title>
      <link>https://dev.to/aurum_revenue</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aurum_revenue"/>
    <language>en</language>
    <item>
      <title>EU AI Act Article 50 in practice: who must mark, who must disclose</title>
      <dc:creator>Aurum Revenue</dc:creator>
      <pubDate>Sat, 21 Nov 2026 12:32:15 +0000</pubDate>
      <link>https://dev.to/aurum_revenue/eu-ai-act-article-50-in-practice-who-must-mark-who-must-disclose-169g</link>
      <guid>https://dev.to/aurum_revenue/eu-ai-act-article-50-in-practice-who-must-mark-who-must-disclose-169g</guid>
      <description>&lt;h1&gt;
  
  
  EU AI Act Article 50 in practice: who must mark, who must disclose
&lt;/h1&gt;

&lt;p&gt;Regulation (EU) 2024/1689 (the AI Act) applies in stages. &lt;strong&gt;Article 50 - the transparency chapter - applies from 2 August 2026.&lt;/strong&gt; If you build or operate any feature that emits synthetic text, images, audio or video, two different duty holders matter, and they are not the same team: the &lt;strong&gt;provider&lt;/strong&gt; (who develops or places the system on the market) and the &lt;strong&gt;deployer&lt;/strong&gt; (who uses it under its authority).&lt;/p&gt;

&lt;p&gt;Mixing those two up is the most common planning error. Here is the split, in the regulation's own terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Article 50(2) - the provider duty: machine-readable marking
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"Providers of AI systems, including general-purpose AI systems, generating synthetic audio, image, video or text content, shall ensure that the outputs of the AI system are marked in a machine-readable format and detectable as artificially generated or manipulated."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Three things worth internalising:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It is a provider duty.&lt;/strong&gt; If you fine-tune, wrap, host or resell a model, you are very likely a provider of the wrapped system, not merely a deployer of someone else's.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The mark must be machine-readable&lt;/strong&gt;, not merely visible. A caption saying "generated with AI" belongs to the disclosure duties below; 50(2) wants something a crawler, a platform filter or a downstream auditor can detect without reading prose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The exemption is narrow.&lt;/strong&gt; It covers systems performing "an assistive function for standard editing" that do not substantially alter the input data or its semantics. &lt;em&gt;Rewrite this paragraph to be shorter&lt;/em&gt; can qualify. &lt;em&gt;Generate 40 articles from this keyword&lt;/em&gt; cannot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under 50(7) the Commission treats adherence to a Code of Practice as a way to demonstrate compliance with 50(2) and 50(4); if no code is deemed adequate, an implementing act sets common rules. Under the Digital Omnibus amendments the &lt;strong&gt;marking transition for 50(2) runs to 2 December 2026&lt;/strong&gt; - that is the date by which a generation pipeline needs to emit a verifiable mark.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Article 50(4) - the deployer duty: disclosure
&lt;/h2&gt;

&lt;p&gt;Deployers must disclose when they generate or manipulate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;image, audio or video that is a deep fake&lt;/strong&gt; - content resembling existing persons, objects, places, entities or events that would falsely appear authentic; and&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;text published with the purpose of informing the public on matters of public interest.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second bullet is the quiet trap. A newsroom, a policy team, a documentation site or an NGO publishing AI-drafted text on public-interest topics has a disclosure duty - &lt;em&gt;unless&lt;/em&gt; the content underwent human review and editorial control and a natural or legal person holds editorial responsibility for the publication. That exception is narrower than "a human looked at it": someone has to actually hold editorial responsibility.&lt;/p&gt;

&lt;p&gt;Deep fakes carry a narrower carve-out: evidently artistic, creative, satirical or fictional works need only disclose "in an appropriate manner that does not hamper the display or enjoyment of the work".&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Articles 50(1) and 50(5) - interaction and timing
&lt;/h2&gt;

&lt;p&gt;Any AI system intended to interact directly with natural persons must be designed so those persons are informed they are interacting with an AI system, unless that is obvious to a reasonably well-informed, observant and circumspect person in the context of use.&lt;/p&gt;

&lt;p&gt;All information required by 50(1)-50(4) must be given &lt;strong&gt;at the latest at the time of the first interaction or exposure&lt;/strong&gt;, clearly and distinguishably, conforming to applicable accessibility requirements. A notice three screens deep fails the timing test.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. A ten-point readiness checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Inventory&lt;/strong&gt; every feature that emits synthetic text, image, audio or video. Record owner, model and your role.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classify&lt;/strong&gt; each as provider-side (you place it on the market) or deployer-side (you use it under your authority).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define the mark&lt;/strong&gt; for provider-side generation: metadata (C2PA / Content Credentials), in-band signals, or both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prove survival&lt;/strong&gt;: the mark must still be detectable after API response, download, repost and re-encode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick the disclosure surface&lt;/strong&gt; for deployer-side deep fakes: player overlay, adjacent caption, or both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test the editorial exception&lt;/strong&gt; honestly for public-interest text, and name who holds editorial responsibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check 50(1)&lt;/strong&gt; for any feature that interacts with people - is the AI disclosure needed, or is it obvious?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check timing&lt;/strong&gt; - is the notice present at first interaction or exposure, not later?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check accessibility&lt;/strong&gt; of every notice you emit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the evidence&lt;/strong&gt;: marking specification, test results and the decision record an auditor will ask for.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  5. The operative wording, mapped
&lt;/h2&gt;

&lt;p&gt;The above is a summary. When you write the actual policy you want the paragraphs side by side with the definitions they lean on (AI system, provider, deployer, deep fake, input data) and the exemption boundaries quoted verbatim, plus the deadline table from Article 113 and the Digital Omnibus changes.&lt;/p&gt;

&lt;p&gt;I maintain a one-page &lt;strong&gt;Art. 50(2) Evidence Report&lt;/strong&gt; that does exactly that: the operative wording of 50(1)-(5), a provider/deployer duty map, the marking and disclosure mechanics, the deadline table, and an audit-trail template - built for engineers and compliance leads who have to turn the article into a ticket. It is here: &lt;a href="https://derbaroser-eng.github.io/art50-conform/" rel="noopener noreferrer"&gt;https://derbaroser-eng.github.io/art50-conform/&lt;/a&gt; (one-time EUR 490, checkout on the page).&lt;/p&gt;

&lt;p&gt;If you do one thing this week: run steps 1 and 2 on your own roadmap. Most teams discover they are a provider for something they thought was a deployer feature.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was drafted with AI assistance and reviewed by a human before publication.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>europe</category>
    </item>
    <item>
      <title>Your subprocess call is a shell injection waiting to happen</title>
      <dc:creator>Aurum Revenue</dc:creator>
      <pubDate>Sat, 21 Nov 2026 12:00:23 +0000</pubDate>
      <link>https://dev.to/aurum_revenue/your-subprocess-call-is-a-shell-injection-waiting-to-happen-2m2a</link>
      <guid>https://dev.to/aurum_revenue/your-subprocess-call-is-a-shell-injection-waiting-to-happen-2m2a</guid>
      <description>&lt;p&gt;A few weeks ago a build script of mine died with a bash syntax error. The command looked harmless:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"compute (17*23) and print it"&lt;/span&gt;
&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"echo {prompt}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bash saw &lt;code&gt;(17*23)&lt;/code&gt; and tried to parse a subshell. The script aborted. Worse: if that string had come from a user, &lt;code&gt;`rm -rf ~`&lt;/code&gt; would have executed.&lt;/p&gt;

&lt;p&gt;This is the single most common way Python code accidentally becomes an attack surface. &lt;code&gt;shell=True&lt;/code&gt; plus an f-string is a remote code execution primitive dressed up as convenience.&lt;/p&gt;

&lt;h2&gt;
  
  
  The usual advice, and why it is not enough
&lt;/h2&gt;

&lt;p&gt;"Use a list, never &lt;code&gt;shell=True&lt;/code&gt;." Correct, and still incomplete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"echo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"(17*23)"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# safe&lt;/span&gt;
&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"-c"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# back to square one&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The moment you legitimately need a shell — pipes, globs, a tool that only speaks shell — you are back to building a string. And building a shell string by hand is where people get it wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually goes wrong
&lt;/h2&gt;

&lt;p&gt;MSYS/git-bash on Windows expands &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;~&lt;/code&gt; in argv before your program sees them. &lt;code&gt;shlex.quote&lt;/code&gt; protects against the shell, but not against a layer that rewrites arguments before the shell runs. Quoting rules differ between &lt;code&gt;cmd.exe&lt;/code&gt;, PowerShell, and POSIX sh. A single &lt;code&gt;!&lt;/code&gt; can trigger history expansion in an interactive shell.&lt;/p&gt;

&lt;p&gt;I wrote &lt;strong&gt;shellguard&lt;/strong&gt; to make this boring:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;shellguard&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;sg&lt;/span&gt;

&lt;span class="n"&gt;sg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"echo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"(17*23)"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# -&amp;gt; '(17*23)\n'&lt;/span&gt;
&lt;span class="n"&gt;sg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"echo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"`echo INJECTED`"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# -&amp;gt; literal text, nothing executed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero dependencies. It builds the command line correctly for the shell you are actually targeting, and it refuses to silently interpolate untrusted data into a shell string.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I care about most
&lt;/h2&gt;

&lt;p&gt;The test suite is 26 real attack cases. Not mocked. Each test spawns an actual subprocess and asserts on the real exit code and real stdout:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;command substitution with backticks and &lt;code&gt;$()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;chained commands with &lt;code&gt;;&lt;/code&gt;, &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;||&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;glob and tilde expansion under MSYS&lt;/li&gt;
&lt;li&gt;newline and carriage-return injection&lt;/li&gt;
&lt;li&gt;quote-breaking with mixed &lt;code&gt;'&lt;/code&gt; and &lt;code&gt;"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a payload executes, the test fails. That is the only assertion that matters for a security library.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Library: &lt;a href="https://github.com/derbaroser-eng/shellguard-lib" rel="noopener noreferrer"&gt;https://github.com/derbaroser-eng/shellguard-lib&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs and examples: &lt;a href="https://derbaroser-eng.github.io/shellguard/" rel="noopener noreferrer"&gt;https://derbaroser-eng.github.io/shellguard/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have ever written &lt;code&gt;f"grep {user_input} file.txt"&lt;/code&gt;, this is for you.&lt;/p&gt;

&lt;p&gt;What is the worst shell-quoting bug you have shipped? I would genuinely like to know — the test suite grows from real incidents.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>python</category>
      <category>security</category>
    </item>
  </channel>
</rss>
