<?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: Gavriliuc Vlada</title>
    <description>The latest articles on DEV Community by Gavriliuc Vlada (@gavriliucvlada).</description>
    <link>https://dev.to/gavriliucvlada</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%2F4064363%2F8d0d1165-96bc-49ec-94b6-9239bb874167.jpg</url>
      <title>DEV Community: Gavriliuc Vlada</title>
      <link>https://dev.to/gavriliucvlada</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gavriliucvlada"/>
    <language>en</language>
    <item>
      <title>A school trust wants web filtering. I thought it was a blocklist. It isn't.</title>
      <dc:creator>Gavriliuc Vlada</dc:creator>
      <pubDate>Wed, 18 Nov 2026 17:25:49 +0000</pubDate>
      <link>https://dev.to/gavriliucvlada/a-school-trust-wants-web-filtering-i-thought-it-was-a-blocklist-it-isnt-1l3</link>
      <guid>https://dev.to/gavriliucvlada/a-school-trust-wants-web-filtering-i-thought-it-was-a-blocklist-it-isnt-1l3</guid>
      <description>&lt;p&gt;This week I found a small notice on Find a Tender that I almost skipped. The title is just "Web Filtering and Monitoring". The buyer is The David Ross Education Trust, a multi-academy trust in England (a group of schools run by one organisation).&lt;/p&gt;

&lt;p&gt;My first thought was that this is boring. Web filtering is a blocklist, right? You have a list of bad websites, the school network says no, done. I have seen this as a student myself. Half of the internet was blocked and we all knew which proxy sites still worked.&lt;/p&gt;

&lt;p&gt;But I read the notice and then the government guidance it points to, and I changed my mind a bit. It is more like an access control problem with a safeguarding team at the end of it.&lt;/p&gt;

&lt;p&gt;You can read &lt;a href="https://www.find-tender.service.gov.uk/Notice/101292-2026" rel="noopener noreferrer"&gt;the notice here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the notice says
&lt;/h2&gt;

&lt;p&gt;First the facts, then my guesses.&lt;/p&gt;

&lt;p&gt;It is a preliminary market engagement notice, so it is not a tender yet. The trust wants to talk to suppliers before it writes the real procurement. It was published on 26 October 2026 and edited the next day. The deadline to register interest was 6 November 2026, so that part is already closed. The estimated date for the real tender is 11 January 2027. The contract would run from 1 July 2027 to 1 July 2030, with a possible extension to 1 July 2032. I did not see a value in the notice.&lt;/p&gt;

&lt;p&gt;The things they are interested in include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;staff and student devices&lt;/li&gt;
&lt;li&gt;filtering and monitoring on-site and off-site&lt;/li&gt;
&lt;li&gt;working across a multi-academy trust&lt;/li&gt;
&lt;li&gt;"Centralised safeguarding, alerting and reporting functions"&lt;/li&gt;
&lt;li&gt;"Role-based administration and access controls"&lt;/li&gt;
&lt;li&gt;following the Department for Education filtering and monitoring expectations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They also ask suppliers if one company should do both filtering and monitoring, or if it is better to split them into separate contracts. I found that question interesting, and I come back to it at the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the DfE guidance adds
&lt;/h2&gt;

&lt;p&gt;The notice mentions DfE expectations, so I opened the &lt;a href="https://www.gov.uk/guidance/meeting-digital-and-technology-standards-in-schools-and-colleges/filtering-and-monitoring-standards-for-schools-and-colleges" rel="noopener noreferrer"&gt;filtering and monitoring standards on GOV.UK&lt;/a&gt;. The page says it was updated on 16 September 2026.&lt;/p&gt;

&lt;p&gt;A few lines surprised me as a developer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filtering should block harmful content "without unreasonably impacting teaching and learning". So blocking too much is also a failure.&lt;/li&gt;
&lt;li&gt;The filtering system should not have "a blanket filtering profile for all users". So one list for everybody is not enough.&lt;/li&gt;
&lt;li&gt;Filtering should also apply to school devices taken off-site, and to personal devices under a bring your own device (BYOD) scheme.&lt;/li&gt;
&lt;li&gt;Some blocklists, from the IWF and the CTIRU, "cannot be disabled, overridden, or altered by any user". Not even an admin.&lt;/li&gt;
&lt;li&gt;Monitoring should give "immediate reports when an incident is classed as high-risk" and also weekly reports.&lt;/li&gt;
&lt;li&gt;The designated safeguarding lead (DSL) is the person responsible for safeguarding issues found through monitoring.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So now I have users with different profiles, different devices, two kinds of rules (locked ones and normal ones), and two speeds of reporting. This is the point where I wanted to write code.&lt;/p&gt;

&lt;h2&gt;
  
  
  My tiny model
&lt;/h2&gt;

&lt;p&gt;Everything in this example is invented by me. The profile names, categories and rules are not from the notice. I just wanted to see the shape of it.&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;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;

&lt;span class="c1"&gt;# lists that nobody is allowed to switch off&lt;/span&gt;
&lt;span class="no"&gt;LOCKED&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"child_abuse"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"terrorism"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# who may see which category (my own invented rules)&lt;/span&gt;
&lt;span class="no"&gt;PROFILES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"year7"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"social_media"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"gaming"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"adult"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"year12"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"social_media"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s2"&gt;"gaming"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"adult"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"staff"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"social_media"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s2"&gt;"gaming"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="s2"&gt;"adult"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;@dataclass&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;   &lt;span class="c1"&gt;# "school" or "byod"&lt;/span&gt;
    &lt;span class="n"&gt;on_site&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;
    &lt;span class="n"&gt;category&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;category&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;LOCKED&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"block"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"high"&lt;/span&gt;
    &lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;PROFILES&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;category&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"block"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"low"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;risk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;risk&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"high"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"alert DSL now"&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;risk&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"low"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"weekly report"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"-"&lt;/span&gt;

&lt;span class="n"&gt;requests&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"amir"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"year7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"school"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"education"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"amir"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"year7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"school"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"gaming"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"lena"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"year12"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"byod"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"social_media"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"mr_k"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"staff"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"school"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"social_media"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"lena"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"year12"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"byod"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"terrorism"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;risk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;decide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;where&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"on-site"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;on_site&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;"off-site"&lt;/span&gt;
    &lt;span class="k"&gt;print&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;"{r.user:5} {r.profile:6} {r.device:6} {where:8} {r.category:13} -&amp;gt; {action:5} | {route(r, risk)}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I run it I get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;amir  year7  school on-site  education     -&amp;gt; allow | -
amir  year7  school off-site gaming        -&amp;gt; block | weekly report
lena  year12 byod   on-site  social_media  -&amp;gt; allow | -
mr_k  staff  school on-site  social_media  -&amp;gt; allow | -
lena  year12 byod   on-site  terrorism     -&amp;gt; block | alert DSL now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important line for me is the first check in &lt;code&gt;decide&lt;/code&gt;. The locked list is checked before the profile, so no profile can open it. If I put that check after the profile lookup, a badly configured staff profile could allow something that should never be allowed. In my first version I did exactly that, and only noticed when I wrote the comment above it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where my model is too simple
&lt;/h2&gt;

&lt;p&gt;In quite a lot of places.&lt;/p&gt;

&lt;p&gt;My model sends every normal block to the weekly report. But a Year 7 student trying a gaming site at lunch is probably not a safeguarding concern. If the DSL gets 4,000 lines like that every week, the one real problem gets lost. I think a big part of the real product is deciding what is noise.&lt;/p&gt;

&lt;p&gt;I store &lt;code&gt;device&lt;/code&gt; and &lt;code&gt;on_site&lt;/code&gt; but my rules don't use them. In real life I guess they matter a lot. How do you even filter a school laptop at home? My guess is some agent software on the device, or traffic going through the school's system, but I don't know which is more common.&lt;/p&gt;

&lt;p&gt;Monitoring is more than URLs. The guidance talks about alerts and observations, and some products watch what people type. That is a big privacy question for students and I don't feel ready to model it.&lt;/p&gt;

&lt;p&gt;And the trust has many schools. Who can change the profiles? One central team, or each school? "Role-based administration" probably means that a teacher in one school should not see alerts from another school. That would be one more check in my code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one supplier or two question
&lt;/h2&gt;

&lt;p&gt;Now I understand why the trust asks this. Filtering and monitoring share the same data: who the user is and which profile they have. If two suppliers do them, they both need the same user list and they need to agree on who is who. That sounds like a sync problem to me. But one supplier for everything means you depend on one company for five years or more.&lt;/p&gt;

&lt;p&gt;I don't know the right answer. I am curious what people think.&lt;/p&gt;

&lt;p&gt;If you have worked on school IT or on any content filtering system, did you split filtering and monitoring between tools, or keep them in one? And how did you stop the alerts from turning into noise?&lt;/p&gt;

</description>
      <category>python</category>
      <category>security</category>
      <category>beginners</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How do you check that an exam certificate is real? I tried to model it</title>
      <dc:creator>Gavriliuc Vlada</dc:creator>
      <pubDate>Sat, 07 Nov 2026 19:38:57 +0000</pubDate>
      <link>https://dev.to/gavriliucvlada/how-do-you-check-that-an-exam-certificate-is-real-i-tried-to-model-it-27d7</link>
      <guid>https://dev.to/gavriliucvlada/how-do-you-check-that-an-exam-certificate-is-real-i-tried-to-model-it-27d7</guid>
      <description>&lt;p&gt;This week I was reading notices on the Irish eTenders site and one of them stopped me. Maynooth University wants a new system for TEG, the European Certificate in Irish. TEG is their language exam for adults who learn Irish.&lt;/p&gt;

&lt;p&gt;I expected a boring website tender. It is partly that. But one line in the list of things they want made me think about code for the whole evening: "an automated digital exam certification solution".&lt;/p&gt;

&lt;p&gt;You can read &lt;a href="https://www.etenders.gov.ie/epps/cft/prepareViewCfTWS.do?resourceId=9381997" rel="noopener noreferrer"&gt;the notice here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the notice says
&lt;/h2&gt;

&lt;p&gt;I want to keep the facts separate from my guesses, so first the facts.&lt;/p&gt;

&lt;p&gt;The buyer is Maynooth University. The notice was published on 28 October 2026 and the deadline for tenders is 10 December 2026 at 12:00. Questions can be asked until 3 December. The contract is for 36 months. The description says the total budget is €130,300 excluding VAT. (The "estimated value" field on the same page says 130,000, so there is a small difference between the two numbers.)&lt;/p&gt;

&lt;p&gt;The reason for the project is growth. The notice says candidate numbers are "projected to reach approximately 5,000 annually".&lt;/p&gt;

&lt;p&gt;The system they describe has these parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a bilingual public website with a CMS&lt;/li&gt;
&lt;li&gt;a self-service portal where candidates book and pay for exams&lt;/li&gt;
&lt;li&gt;an admin platform for the staff&lt;/li&gt;
&lt;li&gt;automated digital exam certificates&lt;/li&gt;
&lt;li&gt;integration with a digital language testing platform&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TEG exams are "broadly based" on the Common European Framework of Reference for Languages, the CEFR. The &lt;a href="https://www.coe.int/en/web/common-european-framework-reference-languages" rel="noopener noreferrer"&gt;Council of Europe page&lt;/a&gt; says the CEFR has six levels, A1 to C2. The TEG website says exams are offered at five levels at present, A1 to C1.&lt;/p&gt;

&lt;p&gt;A reader asked me about verification, so I went back and checked. I was wrong here before: the full tender documents can be downloaded without an account. The main document asks for a clickable link on each certificate, so employers can check it on a page on teg.ie. The page should show the candidate’s initials, not the full name, plus the exam number, level, date and scores.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the certificate part caught my attention
&lt;/h2&gt;

&lt;p&gt;My first thought was: a digital certificate is just a PDF, right? You make a nice template, put the name and the level on it, done.&lt;/p&gt;

&lt;p&gt;Then I thought about who uses this certificate. A person passes B1 and then sends the certificate to an employer, or to a school, or to a public body that needs Irish speakers. And that employer has to decide if it is real.&lt;/p&gt;

&lt;p&gt;A PDF is very easy to edit. Changing "B1" to "B2" takes about one minute. So for me the hard part is the checking. How does the employer know it is real without calling the university every time?&lt;/p&gt;

&lt;p&gt;The EU already has an answer for this kind of problem. &lt;a href="https://europass.europa.eu/en/european-digital-credentials-learning" rel="noopener noreferrer"&gt;European Digital Credentials for Learning&lt;/a&gt; are described on the Europass site as "a verifiable, digital version of a credential". They are signed with an electronic seal, which is a kind of digital signature that belongs to an organisation.&lt;/p&gt;

&lt;p&gt;I don't know if Maynooth will use this, or something else. The notice does not say. But the basic idea is the same in most systems, so I tried to build the smallest version of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  My tiny model
&lt;/h2&gt;

&lt;p&gt;The idea is simple. The exam centre has a private key and keeps it secret. It signs the certificate data with that key. Everyone else gets the public key. With the public key you can check the signature, but you cannot make a new one.&lt;/p&gt;

&lt;p&gt;I used Ed25519 from the &lt;code&gt;cryptography&lt;/code&gt; package because the API is short.&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="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cryptography.hazmat.primitives.asymmetric.ed25519&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Ed25519PrivateKey&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cryptography.exceptions&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;InvalidSignature&lt;/span&gt;

&lt;span class="c1"&gt;# The exam centre keeps this key secret
&lt;/span&gt;&lt;span class="n"&gt;private_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Ed25519PrivateKey&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="c1"&gt;# Anyone (an employer, a school) can have this one
&lt;/span&gt;&lt;span class="n"&gt;public_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;private_key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;public_key&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;to_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# same dict -&amp;gt; same bytes, every time
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sort_keys&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;separators&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;signature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;private_key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sign&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;to_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;signature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;signature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;signed&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;public_key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromhex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;signed&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;signature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt; &lt;span class="nf"&gt;to_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;signed&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valid&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;InvalidSignature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;NOT valid&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;


&lt;span class="n"&gt;signed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;TEG-2027-000123&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;candidate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Aoife Example&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;level&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;B1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;components&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;oral&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pass&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;written&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pass&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;issued&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2027-06-30&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;original:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;signed&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="c1"&gt;# someone edits the PDF / JSON and makes it a B2
&lt;/span&gt;&lt;span class="n"&gt;signed&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;level&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;B2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;edited:  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;signed&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I run it I get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;original: valid
edited:   NOT valid
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The certificate ID format, the name and the fields are all invented by me. I just wanted something that looks a bit like a real exam result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things I got wrong at first
&lt;/h2&gt;

&lt;p&gt;My first version did not have &lt;code&gt;sort_keys=True&lt;/code&gt;. It still worked in my test, because Python keeps the order of dict keys. But if another system rebuilds the same certificate with the keys in a different order, the bytes change and a real certificate looks fake. That scared me a little, because it is the kind of bug you only find when a real person complains. Real standards solve this with fixed formats, and I think that is one reason they exist.&lt;/p&gt;

&lt;p&gt;The second thing I noticed is what my model does not do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the private key leaks, anyone can make "valid" certificates. Keeping that key safe is probably harder than writing the code.&lt;/li&gt;
&lt;li&gt;There is no way to cancel a certificate. If a result is changed after an appeal, the old signed file is still "valid" in my model. I guess a real system needs some kind of revocation list or status check.&lt;/li&gt;
&lt;li&gt;The employer needs to get the public key from somewhere they trust. If I can trick them into using my key, my fake certificate passes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My guess is that the supplier will not invent any of this from zero. They will probably use an existing credential format and a signing service. But somebody still has to decide what goes inside the certificate, and that part looks like normal database and design work. Should it show the oral and written results separately? The TEG site says candidates can take only the oral exam to get certification in the spoken language, so the data model needs to allow that too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I take from this
&lt;/h2&gt;

&lt;p&gt;For a €130,300 budget over 36 months, the notice asks for a lot: website, CMS, booking, payments, admin, certificates and an integration. I am not sure how much of the certificate work fits inside that. Maybe it is mostly about choosing a good existing product.&lt;/p&gt;

&lt;p&gt;I also like that a language exam tender made me read about Ed25519 late in the evening. I did not expect that when I opened the notice.&lt;/p&gt;

&lt;p&gt;If you have built something that issues certificates or diplomas, how do you handle revocation in real life? Do people actually check it, or does everyone just trust the PDF?&lt;/p&gt;

</description>
      <category>python</category>
      <category>discuss</category>
      <category>beginners</category>
      <category>security</category>
    </item>
    <item>
      <title>What does a privacy and AI governance platform store? I tried to model it</title>
      <dc:creator>Gavriliuc Vlada</dc:creator>
      <pubDate>Wed, 04 Nov 2026 17:44:46 +0000</pubDate>
      <link>https://dev.to/gavriliucvlada/what-does-a-privacy-and-ai-governance-platform-store-i-tried-to-model-it-3a8j</link>
      <guid>https://dev.to/gavriliucvlada/what-does-a-privacy-and-ai-governance-platform-store-i-tried-to-model-it-3a8j</guid>
      <description>&lt;p&gt;In August 2026 the BBC published a short notice on the UK's Find a Tender service. It asks the market about a "privacy and AI governance platform". It is an RFI, a request for information. A buyer sends one when it wants to ask questions before a real tender, so nobody is buying anything yet. The notice gives no contract value. You can read &lt;a href="https://tenderwell.com/tender/rfi-privacy-and-ai-governance-platform-45651858?ref=dev.to"&gt;the notice here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The text is short. The BBC lists the governance work it does today: Data Protection Impact Assessments (DPIAs), Transfer Risk Assessments (TRAs/TIAs), AI Risk Assessments, risk acceptance, Records of Processing Activities (RoPA), case management and governance reporting. It says this work is done with "a combination of manual processes and existing tools". Now it wants to know if a platform could make this work more efficient, more consistent and more mature.&lt;/p&gt;

&lt;p&gt;I read that list as a developer, and I saw a data model.&lt;/p&gt;

&lt;h2&gt;
  
  
  What each record is
&lt;/h2&gt;

&lt;p&gt;A DPIA is a check for risky projects. The &lt;a href="https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/accountability-and-governance/guide-to-accountability-and-governance/data-protection-impact-assessments" rel="noopener noreferrer"&gt;ICO&lt;/a&gt;, the UK data protection regulator, says it helps you find and reduce the data protection risks of a project. If it finds a high risk that you can't reduce, you must consult the ICO before you start.&lt;/p&gt;

&lt;p&gt;A &lt;a href="https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/international-transfers/completing-a-transfer-risk-assessment" rel="noopener noreferrer"&gt;transfer risk assessment&lt;/a&gt; is a similar check for personal data that leaves the UK. An AI risk assessment does the same job for an AI system. Risk acceptance is when someone senior says: we know about this risk, and we accept it. RoPA is a list of what personal data you process and why. UK GDPR asks for it in Article 30.&lt;/p&gt;

&lt;p&gt;All of these are records. Each one has an owner, a status and a date. Most of them belong to a system or a project. That is why a spreadsheet works for a while.&lt;/p&gt;

&lt;h2&gt;
  
  
  A toy model
&lt;/h2&gt;

&lt;p&gt;This is my own example, not the BBC's. It only shows the shape of the problem.&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="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;

&lt;span class="nd"&gt;@dataclass&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Assessment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;            &lt;span class="c1"&gt;# "DPIA", "TRA" or "AI_RISK"
&lt;/span&gt;    &lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;residual_risk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;   &lt;span class="c1"&gt;# "low", "medium" or "high", after fixes
&lt;/span&gt;    &lt;span class="n"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;review_by&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;needs_ico&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# A DPIA with a high risk you cannot reduce
&lt;/span&gt;    &lt;span class="c1"&gt;# means you must consult the ICO first.
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DPIA&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;residual_risk&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;high&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;overdue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;review_by&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;today&lt;/span&gt;

&lt;span class="n"&gt;records&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nc"&gt;Assessment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DPIA&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;viewer app&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;low&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sam&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2027&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="nc"&gt;Assessment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DPIA&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;voice search&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;high&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Priya&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2026&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="nc"&gt;Assessment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AI_RISK&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;subtitle model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;medium&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tom&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2026&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2026&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;flags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;needs_ico&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;flags&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ask ICO&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;overdue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;flags&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;overdue&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flags&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ok&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I run it, I get this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A1 viewer app ok
A2 voice search ['ask ICO']
A3 subtitle model ['overdue']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The viewer app is fine. The voice search DPIA still has a high risk, so it goes to the ICO. The AI risk assessment for the subtitle model was due on 15 September, so it is late.&lt;/p&gt;

&lt;p&gt;It's about thirty lines, and it already answers two questions a privacy team asks every week: what needs the regulator, and what is late?&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it gets hard
&lt;/h2&gt;

&lt;p&gt;The notice says nothing about how the BBC wants this to work, so this part is my guess.&lt;/p&gt;

&lt;p&gt;One system can have a DPIA, a transfer assessment and an AI risk assessment at the same time, and they should point to each other. In my model they can't. The first fix I would try is a &lt;code&gt;links&lt;/code&gt; table, so one record can refer to another. After that you need history (who changed what, and when), approvals, and reports that don't take a week to build by hand.&lt;/p&gt;

&lt;p&gt;This part is boring to build. It is also the part that lets a privacy team prove an assessment was done, and when.&lt;/p&gt;

&lt;p&gt;The notice also gave 2 November 2026 as an estimated date for a real tender. I haven't found one yet, so check before you rely on that date. If a tender does come, I would watch how the platform handles AI risk assessments. That part feels newer and less settled than DPIAs, but that is only my opinion.&lt;/p&gt;

&lt;p&gt;If you have built a tool like this, what did you get wrong the first time? And how would you store the links between assessments?&lt;/p&gt;

</description>
      <category>python</category>
      <category>privacy</category>
      <category>ai</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What "add a new scheme without changing the code" really means</title>
      <dc:creator>Gavriliuc Vlada</dc:creator>
      <pubDate>Tue, 06 Oct 2026 17:30:42 +0000</pubDate>
      <link>https://dev.to/gavriliucvlada/what-add-a-new-scheme-without-changing-the-code-really-means-72h</link>
      <guid>https://dev.to/gavriliucvlada/what-add-a-new-scheme-without-changing-the-code-really-means-72h</guid>
      <description>&lt;p&gt;A Norwegian public body just asked for a new system. One line in the request caught my eye. They want to add new support schemes "without extensive changes to the program code."&lt;/p&gt;

&lt;p&gt;The buyer is Garantikassen for fiskere, the Guarantee Fund for fishermen, in Trondheim. The tender is open until 30 November 2026. You can read the &lt;a href="https://tenderwell.com/tender/new-trade-system-for-the-guarantee-fund-for-fishermen-49165795" rel="noopener noreferrer"&gt;full tender notice here&lt;/a&gt;. I did not see a contract value in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The plan, in short
&lt;/h2&gt;

&lt;p&gt;They want to replace their current system. It will be built in two phases. First the crew-based schemes, then the vessel-based ones. They also ask for configurable rules and rates, a full history of every change, and good screens for both their own case officers and outside users.&lt;/p&gt;

&lt;p&gt;It sounded abstract to me, so I looked at what the Fund really does.&lt;/p&gt;

&lt;h2&gt;
  
  
  One scheme, in real life
&lt;/h2&gt;

&lt;p&gt;The Fund's own website has the rules for a 2026 fuel grant for the coastal shrimp fleet. Here is what &lt;a href="https://www.garantikassen.no/tjenester/tilskudd-til-drivstoff-for-kystrekeflaten-kategori/regelverk-for-tilskudd-til-drivstoff-for-kystrekeflaten-i-2026/" rel="noopener noreferrer"&gt;the regulation&lt;/a&gt; says:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The grant is 3.50 NOK per litre of fuel.&lt;/li&gt;
&lt;li&gt;A vessel can apply up to 12 times.&lt;/li&gt;
&lt;li&gt;The fuel must be bought in 2026.&lt;/li&gt;
&lt;li&gt;Money is paid while there is money left. Earlier applications go first.&lt;/li&gt;
&lt;li&gt;If wrong information was given, the money can be taken back.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same website says another scheme, a 2025 bait grant for line vessels, was closed and not continued in 2026. So a scheme can live for one year, then disappear. Next year a new one comes with a different rate and different limits.&lt;/p&gt;

&lt;p&gt;If every scheme meant a new release, the developers would never stop. That is the problem the tender line is about.&lt;/p&gt;

&lt;h2&gt;
  
  
  A mini example
&lt;/h2&gt;

&lt;p&gt;This is my own toy code. It is not how the Fund will build it, and the real documents may ask for something different. But it shows the idea.&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="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;

&lt;span class="c1"&gt;# One scheme is just data.
&lt;/span&gt;&lt;span class="n"&gt;fuel_2026&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;coastal-shrimp-fuel-2026&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valid_from&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2026&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valid_to&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2026&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rate_per_litre&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;3.50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;# NOK
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max_applications&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;decide&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;application&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;past_applications&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;past_applications&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max_applications&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rejected&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reason&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;too many applications&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valid_from&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;application&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bunkered_on&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valid_to&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rejected&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reason&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fuel not bought in scheme period&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;application&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;litres&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rate_per_litre&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Save the rate we used. Next year's rate must not change this record.
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;approved&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;scheme&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rate_used&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rate_per_litre&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I ran it. For 1,000 litres bought on 10 March 2026, it approves 3,500 NOK. Fuel bought on 30 December 2025 is rejected. A 13th application is rejected too.&lt;/p&gt;

&lt;p&gt;Notice the rate_used line. If the decision only said "approved, scheme X", you could not explain it later, after the rate changes. That is why the tender asks for full history and traceability. The number has to be stored with the decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does not fit in one function
&lt;/h2&gt;

&lt;p&gt;My example is easy because it skips the hard parts. The real regulation also has two ways to qualify for the grant. It has a first-come queue. If money is left at the end of the year, it is shared by litres. A case officer can make exceptions in special cases. And there is an appeals process through another agency.&lt;/p&gt;

&lt;p&gt;I don't know how I would put all of that in config without it turning into a second programming language. Maybe the answer is a few rule types in code and the numbers in config. Maybe it is something smarter. I am curious how the winning team will do it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The contract part
&lt;/h2&gt;

&lt;p&gt;The tender also says the work will follow two Norwegian state standard agreements, SSA-T for development and SSA-V for maintenance. The government's &lt;a href="https://www.anskaffelser.no/anskaffelsesregelverk/statens-standardavtaler-ssa" rel="noopener noreferrer"&gt;SSA page&lt;/a&gt; describes SSA-T as the template for software that is built or adapted for the customer. SSA-V gives the customer new versions, support and bug fixes. Digdir, the Norwegian digitalisation agency, says you usually sign the maintenance agreement at the same time as the development one.&lt;/p&gt;

&lt;p&gt;One more thing I noticed. The tender wants iterative development. Digdir describes SSA-T as having a detailed specification phase first, though it also says delivery can be split into parts. So I am not sure how the two fit together in practice. I would like to see that in the full documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I wrote this
&lt;/h2&gt;

&lt;p&gt;Most "flexible system" talk is vague. A real regulation with a rate, a cap and a date range makes it concrete. If you build back-office software, try this: take one real rulebook and see what you can turn into data. You will find out fast where the hard parts are.&lt;/p&gt;

&lt;p&gt;If you have built something like this, I would like to hear what you put in config and what you kept in code.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>webdev</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>The npm Worm That Keeps Coming Back — And Why Governments Are Finally Procuring a Fix</title>
      <dc:creator>Gavriliuc Vlada</dc:creator>
      <pubDate>Tue, 08 Sep 2026 11:22:08 +0000</pubDate>
      <link>https://dev.to/gavriliucvlada/the-npm-worm-that-keeps-coming-back-and-why-governments-are-finally-procuring-a-fix-41cf</link>
      <guid>https://dev.to/gavriliucvlada/the-npm-worm-that-keeps-coming-back-and-why-governments-are-finally-procuring-a-fix-41cf</guid>
      <description>&lt;p&gt;On August 28, 2026, a npm package called &lt;code&gt;@7nohe/openapi-react-query-codegen&lt;/code&gt; — a TanStack Query codegen tool with over 150,000 weekly downloads — started shipping malware. Ten malicious versions went out in twenty minutes. If that timeline sounds familiar, it should: this is the same Shai-Hulud worm family that's been eating through the npm and PyPI ecosystems since September 2025, now on its latest variant, nicknamed &lt;strong&gt;Trinitite&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What's actually interesting here isn't just "another supply chain attack." It's how the attack got in, how little changed about the fix, and — maybe more relevant if you build software that governments end up buying — how regulators are starting to respond with actual procurement, not just guidance documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Trinitite Got In
&lt;/h2&gt;

&lt;p&gt;The compromised release workflow had a genuinely dumb weak point: it treated a pull request comment containing the literal string "npm publish" as authorization to publish a release. No check that the commenter was a maintainer. The attacker checked out the PR, and GitHub Actions OIDC did the rest, publishing straight through the project's own trusted, legitimate pipeline.&lt;/p&gt;

&lt;p&gt;This is the pattern that's defined the whole Shai-Hulud campaign since the original TanStack compromise in May 2026 (CVE-2026-45321, CVSS 9.6): attackers aren't targeting the package anymore, they're targeting the pipeline. That May incident chained a &lt;code&gt;pull_request_target&lt;/code&gt; trigger, GitHub Actions cache poisoning, and OIDC token extraction from runner process memory — and the packages it produced carried &lt;strong&gt;valid SLSA Build Level 3 provenance attestations&lt;/strong&gt;. Read that again: a worm that produces validly signed, attested malicious packages. Provenance confirms where an artifact was built. It says nothing about whether attacker-controlled code executed inside that trusted environment.&lt;/p&gt;

&lt;p&gt;Once installed, Trinitite runs a fairly elaborate obfuscation chain — an XOR-wrapped loader, a hidden &lt;code&gt;binding.gyp&lt;/code&gt; execution path that fires even when you run &lt;code&gt;npm install --ignore-scripts&lt;/code&gt;, AES-256-GCM encrypted payload blobs — before dropping into familiar Shai-Hulud territory: stealing GitHub, npm, PyPI, RubyGems, cloud, Vault, and Kubernetes credentials, then republishing itself through any package the stolen credentials can reach.&lt;/p&gt;

&lt;p&gt;One detail that puts the scale in perspective: &lt;a href="https://thehackernews.com/2026/09/shai-huluds-reach-just-grew-to-469.html" rel="noopener noreferrer"&gt;a report from early September found that the latest Shai-Hulud variant now scans 469 distinct credential locations across developer machines, CI/CD tooling, cloud configs, and even AI tool configs&lt;/a&gt;, up from 189 in earlier versions. The attackers aren't breaking trust relationships anymore. They're just harvesting the credentials that make those relationships work in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "Just Review Your Dependencies" Isn't Really an Answer Anymore
&lt;/h2&gt;

&lt;p&gt;Every writeup on this campaign converges on roughly the same mitigation list: lock down GitHub Actions cache and fork PR behavior, restrict which workflows can mint OIDC publish tokens, don't trust a passing provenance check as proof of safety, treat every secret reachable from a build environment as already exposed.&lt;/p&gt;

&lt;p&gt;All correct. All also things a single team can only partially control, because the actual risk isn't your code — it's the 500+ transitive dependencies you didn't write, sitting in a supply chain you can't fully see. That's exactly the gap a &lt;strong&gt;Software Bill of Materials (SBOM)&lt;/strong&gt; is meant to close: a structured, machine-readable inventory of every component and dependency in a piece of software, so when the next Trinitite-style compromise hits, you can actually answer "are we exposed?" in minutes instead of days of manually grepping lockfiles.&lt;/p&gt;

&lt;p&gt;SBOMs for traditional software are already a regulatory requirement in the EU under the Cyber Resilience Act. What's newer, and what makes this genuinely current, is that the same idea is now being extended specifically to AI systems — where the "dependency graph" includes not just packages but models, datasets, and fine-tuning pipelines, none of which fit cleanly into a traditional SBOM format.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Government Is Already Procuring This
&lt;/h2&gt;

&lt;p&gt;Here's where it stops being abstract. Germany's Federal Office for Information Security (BSI) has an &lt;a href="https://tenderwell.com/tender/projekt-1034-technische-umsetzung-einer-sbom-fur-ki-sbom4ai-47441106" rel="noopener noreferrer"&gt;open tender for a project called SBOM4AI&lt;/a&gt;, published August 28, 2026 — the same day Trinitite started shipping, though the timing there is coincidental rather than causal.&lt;/p&gt;

&lt;p&gt;The scope is specific: take the "SBOM for AI – Minimum Elements" concept published under the G7 framework and turn it into an actual technical implementation — a system that automatically generates a machine-readable SBOM for AI systems, in a format usable by developers, auditors, and regulators, explicitly designed to support Cyber Resilience Act auditability requirements. Contract duration is 18 months, deadline for bids is September 28, 2026.&lt;/p&gt;

&lt;p&gt;What I find worth paying attention to isn't the tender itself so much as what it signals: a national cybersecurity authority is treating "we don't have a standard, automatable way to know what's inside an AI system's supply chain" as a problem serious enough to fund directly, rather than waiting for the private sector or a nonprofit consortium to solve it. Given that AI coding assistants are themselves accelerating how fast new dependencies get pulled into codebases — often outside standard package managers entirely — that's not a bad instinct.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Actually Means for Your Pipeline
&lt;/h2&gt;

&lt;p&gt;You don't need a government contract to take the lesson here. A few concrete things worth doing regardless of team size:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate an SBOM as part of your build, not as an afterthought.&lt;/strong&gt; Tools like Syft, CycloneDX, or GitHub's own dependency graph can do this automatically; the point is having it before an incident, not scrambling to reconstruct it during one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop trusting provenance as a safety signal.&lt;/strong&gt; SLSA attestations tell you where something was built. They don't tell you the build wasn't compromised in-flight, as Trinitite proved twice now.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolate fork PR workflows from cache and publish permissions.&lt;/strong&gt; The &lt;code&gt;pull_request_target&lt;/code&gt; and comment-triggered-publish patterns behind both major TanStack incidents are avoidable with a few lines of workflow config.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat any secret reachable from a CI runner as already leaked.&lt;/strong&gt; Rotate on a schedule, not just on suspicion.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Trinitite won't be the last variant. The people behind the original TeamPCP toolkit were reportedly arrested in Australia shortly before this wave shipped, using the same core malware with new keys and new graffiti strings — which tells you the tooling outlives the individuals running it. The realistic goal isn't preventing the next worm. It's making sure that when it lands, you can answer "what do we actually have deployed, and what depends on it" faster than the worm can spread.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>opensource</category>
      <category>devops</category>
    </item>
    <item>
      <title>The State Machine Hiding Inside Every Construction Project</title>
      <dc:creator>Gavriliuc Vlada</dc:creator>
      <pubDate>Mon, 17 Aug 2026 12:01:31 +0000</pubDate>
      <link>https://dev.to/gavriliucvlada/the-state-machine-hiding-inside-every-construction-project-1n68</link>
      <guid>https://dev.to/gavriliucvlada/the-state-machine-hiding-inside-every-construction-project-1n68</guid>
      <description>&lt;p&gt;Here's a distributed systems problem you probably haven't thought about: dozens of independent teams, each editing their own piece of a shared 3D model, over a timeline of years, where a stale read can mean someone pours concrete based on the wrong version of a structural drawing.&lt;/p&gt;

&lt;p&gt;That's the problem Building Information Modeling (BIM) has to solve, and the system that solves it is called a Common Data Environment, or CDE. It's worth understanding, because it's one of the cleaner real-world examples of a versioned, permissioned, multi-writer data system with the state machine spelled out as an actual international standard instead of left to whatever a team improvised.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why plain file storage doesn't work here
&lt;/h2&gt;

&lt;p&gt;A typical BIM project involves architects, structural engineers, MEP contractors, the client, and external consultants, all editing models that constantly reference each other. A structural engineer's model has to line up with the architect's, which has to line up with the electrical contractor's, across design, approval, and construction phases spanning years.&lt;/p&gt;

&lt;p&gt;Dropbox or SharePoint can hold the files. What they can't answer natively is the question every contributor actually needs answered: is this specific revision of this specific file the one I'm allowed to build from right now, or is it still a draft someone's iterating on? Get that wrong on a construction site and the cost isn't a merge conflict, it's a physical rebuild.&lt;/p&gt;

&lt;h2&gt;
  
  
  The data model: containers, not files
&lt;/h2&gt;

&lt;p&gt;The standard that governs this, ISO 19650, doesn't treat a file as just a file. It defines an "information container": a unit of data with mandatory structured metadata attached:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;State: exactly one of four values at any time: Work in Progress, Shared, Published, or Archived&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Status code (suitability): what the container is currently allowed to be used for, e.g. "for coordination" or "authorized for construction"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Revision: a tracked version number&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Classification: a category code so containers can be filtered and queried systematically, usually against a scheme like Uniclass&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The four states form a directed workflow, not just labels. A container in Work in Progress is visible only to the team producing it. Once it's stable enough for others to reference (but not yet final), it moves to Shared. Once it's contractually approved, it moves to Published. Transitions are meant to be one directional, with defined exceptions for rejection back to an earlier state.&lt;/p&gt;

&lt;p&gt;If you've built approval workflows for a CMS or a PLM system, this pattern will look familiar: draft, review, publish, archive. What's different here is that the states, the metadata schema, and the transition rules are externally standardized, so a CDE built by one vendor and a CDE built by another are expected to expose the same conceptual model, even if the implementation differs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hard engineering problems
&lt;/h2&gt;

&lt;p&gt;A few things make this genuinely nontrivial to build well, beyond just implementing a four-state enum:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Access control that depends on lifecycle state, not just role&lt;/strong&gt;. A permission model here isn't "editor vs viewer." It's "this user can read this container, but only because it's in the Shared state, and only certain fields of its metadata, and that access should change automatically the moment the container moves to Published." That's state-dependent authorization, layered on top of normal role-based access, and it has to be enforced consistently across every client that touches the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interoperability across authoring tools&lt;/strong&gt;. Contributors use different BIM software (Revit, ArchiCAD, Civil 3D, and others), each with its own native file format. To avoid vendor lock-in on the authoring side, CDEs generally need to support IFC (Industry Foundation Classes), an open, schema-based exchange format that represents building elements as structured entities with relationships, not just geometry. Round-tripping data through IFC without losing information is its own hard problem, since different tools implement the schema with slightly different interpretations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-project isolation at scale&lt;/strong&gt;. A CDE is rarely built for one project. It's typically operated as a platform serving many concurrent projects for the same organization, which means project spaces need to be cleanly isolated from each other while still sharing common infrastructure, user directories, and organizational permission structures. Get the isolation boundary wrong and you risk cross-project data leakage, which in a public infrastructure context is a real liability, not just a bug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auditability as a first-class requirement, not a feature&lt;/strong&gt;. Every state transition and revision needs a traceable record: who moved it, when, and under what authorization. This isn't optional logging. In regulated or public-sector contexts, "who approved this exact version, and when" is often a contractual and legal requirement, which means the audit trail has to be tamper-evident, not just present.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seeing the spec in the wild
&lt;/h2&gt;

&lt;p&gt;If you want to see what a real-world requirement for one of these platforms actually looks like, Germany's state highway authority for North Rhine-Westphalia currently has an &lt;a href="https://tenderwell.com/tender/common-data-environment-cde-cloudbasiert-als-saas-neu-46343629" rel="noopener noreferrer"&gt;open tender for a cloud-based CDE&lt;/a&gt;, meant to support around 90 BIM projects over a four year framework. It's a useful read if you want to see how these architectural requirements (multi-tenant isolation, managed cloud delivery, structured functional evaluation) get translated into a concrete specification instead of staying abstract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading on the actual standard
&lt;/h2&gt;

&lt;p&gt;The full specification is published by &lt;a href="https://www.iso.org/standard/68078.html" rel="noopener noreferrer"&gt;ISO&lt;/a&gt; (ISO 19650), and the open exchange format most CDEs are expected to support is documented by &lt;a href="https://www.buildingsmart.org/standards/bsi-standards/industry-foundation-classes/" rel="noopener noreferrer"&gt;buildingSMART International&lt;/a&gt;, the organization that maintains IFC.&lt;/p&gt;

&lt;p&gt;It's a niche corner of software, but the core problem, versioned, permissioned, auditable collaboration on structured data across many independent writers, is one a lot of us end up rebuilding in some form anyway, usually without a standards body telling us what the states are supposed to be called.&lt;/p&gt;

</description>
      <category>distributedsystems</category>
      <category>softwareengineering</category>
      <category>systemdesign</category>
    </item>
  </channel>
</rss>
