<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kevin Mills on Medium]]></title>
        <description><![CDATA[Stories by Kevin Mills on Medium]]></description>
        <link>https://medium.com/@millsks?source=rss-32035d9bb238------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*auN7t4f_J3_T-PcigjxCcw.jpeg</url>
            <title>Stories by Kevin Mills on Medium</title>
            <link>https://medium.com/@millsks?source=rss-32035d9bb238------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:13:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@millsks/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Your requirements.txt Is Not an SBOM]]></title>
            <link>https://medium.com/@millsks/your-requirements-txt-is-not-an-sbom-c10b8b78f021?source=rss-32035d9bb238------2</link>
            <guid isPermaLink="false">https://medium.com/p/c10b8b78f021</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[sbom]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-supply-chain]]></category>
            <dc:creator><![CDATA[Kevin Mills]]></dc:creator>
            <pubDate>Thu, 15 Oct 2026 10:28:31 GMT</pubDate>
            <atom:updated>2026-10-15T10:28:31.134Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Diagram: a requirements.txt with version ranges is locked into a pylock.toml with exact versions and hashes, which produces an SBOM." src="https://cdn-images-1.medium.com/max/1024/1*ciiGL9r9ddm1XG2F4VJLUw.png" /></figure><p><em>Why a software bill of materials has to come from a lockfile, and what your manifest is still good for.</em></p><p>A question comes up whenever a team starts producing SBOMs: can we just point the tool at requirements.txt, pyproject.toml or pixi.toml? Those files list our dependencies, after all, even if most entries say &gt;=4.2 rather than ==4.2.16.</p><p>The short answer: as the source of an SBOM, no. As context read <em>alongside</em> a lockfile, yes. The difference between the two is the whole point of an SBOM.</p><h3>An SBOM is a record, not a wish list</h3><p>A software bill of materials records exactly what shipped: every package, at one version, from one place, with a hash you can check. Security teams feed it to a scanner, legal reads licenses from it, and auditors compare it with last quarter’s.</p><p>A manifest with ranges records something else: what your project is <em>willing</em> to accept. django&gt;=4.2 is a set of versions, and which one you get depends on when you ask.</p><h3>Four things a version range can’t tell you</h3><ol><li><strong>What you actually run.</strong> The same range resolves to different versions depending on the day, the platform and the package index. Two SBOMs built from one unchanged file can disagree, and neither may match what’s installed in production.</li><li><strong>Whether you’re vulnerable.</strong> Scanners such as Grype match advisories against the exact version in each package URL or CPE. A versionless pkg:pypi/django gives them nothing to compare, so you get no result or a meaningless one.</li><li><strong>Everything you didn’t list.</strong> A manifest names your direct dependencies only; the packages they pull in exist only after resolution. One example project in the pixi-sbom repository declares five dependencies, LangChain and Transformers among them, and its uv.lock holds 56 packages. The other 51 are where many surprises start.</li><li><strong>Where anything came from.</strong> Without exact artifacts there are no hashes to verify against and no file URLs to fetch license text from. Lockfiles differ here, too: some record hashes but not download URLs.</li></ol><h3>“Can’t the tool just resolve it?”</h3><p>It could, but then it would be writing a lockfile, and a worse one than your package manager writes. The answer would reflect the moment the SBOM tool ran, not the moment you built, so the document would describe an environment nobody installed.</p><p>Resolving isn’t the problem; resolving at SBOM time is. Resolve once with your package manager, commit the result, and every later SBOM describes that same set.</p><p><a href="https://github.com/aesir-oss/pixi-sbom">pixi-sbom</a>, the tool I maintain, deliberately never resolves. That’s a design choice, not a universal rule: cdxgen can install and resolve a project for you, and Syft catalogs manifests alongside what’s installed. pixi-sbom instead refuses a manifest or a requirements.txt with ranges and names a command that produces a lock. For a plain pyproject.toml, it says:</p><pre>× pyproject.toml is a Python project&#39;s manifest, not a lock: pixi-sbom reads a lockfile and never resolves one<br>  help: run your project&#39;s tool beside it: `uv lock` (uv.lock), `poetry lock` (poetry.lock) or `pdm lock` (pdm.lock);<br>        then pass the lockfile, or leave --lockfile out</pre><p>When the file has a [tool.poetry], [tool.pdm], [tool.uv] or [tool.pixi] table, it names that tool&#39;s lock command instead. For a plain pyproject.toml it doesn&#39;t yet suggest the standard pylock.toml route described below.</p><p>A note on pyproject.toml itself: it isn&#39;t any one tool&#39;s file. It&#39;s the Python standard project file (<a href="https://peps.python.org/pep-0518/">PEP 518</a> for the build system, <a href="https://peps.python.org/pep-0621/">PEP 621</a> for [project] metadata, <a href="https://peps.python.org/pep-0735/">PEP 735</a> for dependency groups), and its dependencies are usually ranges. The standard <em>lock</em> is a different file: pylock.toml, from <a href="https://peps.python.org/pep-0751/">PEP 751</a>.</p><p>A requirements.txt is accepted when every requirement is pinned to one exact version (name==version, with hashes and markers if you have them); anything else, a range included, is refused at that line.</p><h3>Where the manifest still earns its place</h3><p>A lockfile says <em>what</em> is installed. The manifest says <em>why</em>, and that intent is worth carrying into the SBOM:</p><ul><li><strong>Direct or transitive.</strong> Which packages you chose, and which came along as somebody else’s dependency. When a vulnerable package turns up, this decides who fixes it: you bump your own dependency, or you wait on an upstream maintainer.</li><li><strong>Scope.</strong> Development, optional, extras and dependency groups. A CVE in a test-only tool is a different conversation from one in a runtime library.</li><li><strong>Project identity.</strong> The name, version, description and URLs that become the SBOM’s root component.</li></ul><p>pixi-sbom reads pixi.toml or pyproject.toml from beside the lockfile for exactly these, and marks declared packages with a pixi:direct property.</p><p>One more thing the ranges are good for: planning. “Can we take the fixed version without touching the manifest?” is answered by the declared range. That’s a remediation question, though, not an inventory one, so it belongs in your upgrade tooling rather than in the SBOM.</p><h3>What to do instead</h3><p>An SBOM has to come from something already resolved: a lockfile or an installed environment, never a range. Lock first and generate from the lock, or describe the installed environment directly. Keep the manifest beside the lock so its intent comes along.</p><ul><li><strong>pixi.toml:</strong> pixi lock writes pixi.lock.</li><li><strong>pyproject.toml with a standard </strong><strong>[project] table:</strong> uv pip compile pyproject.toml -o pylock.toml, or pip lock . (pip 25.1 and later), writes a PEP 751 pylock.toml. pip lock resolves only for the interpreter and platform it runs on.</li><li><strong>pyproject.toml managed by uv, Poetry or PDM:</strong> uv lock, poetry lock or pdm lock writes that tool&#39;s lockfile.</li><li><strong>requirements.txt with ranges:</strong> uv pip compile requirements.txt -o pylock.toml writes a pylock.toml.</li><li><strong>environment.yml:</strong> conda-lock -f environment.yml -p linux-64 (one -p per platform) writes conda-lock.yml.</li><li><strong>Only an installed environment:</strong> pixi sbom --prefix &lt;env&gt; describes what is actually on disk.</li></ul><p>Every one of these resolves once, at a moment you chose, and writes the answer down. That’s the difference from resolving at SBOM time.</p><p>Commit the lockfile. An SBOM generated from it in CI then lists the same packages, versions and hashes every time; with SOURCE_DATE_EPOCH set, pixi-sbom&#39;s output is byte-identical. Network lookups you opt into, such as vulnerability data, can still add new findings, which is the point of them.</p><h3>The rule</h3><p>Inventory comes from the lock; intent comes from the manifest. An SBOM built that way describes something real, can be checked against advisories, and has the same contents every time you build it.</p><p>If you use pixi, conda-lock, uv, Poetry or PDM, pixi-sbom writes CycloneDX and SPDX documents from those lockfiles; <a href="https://aesir-oss.github.io/pixi-sbom/latest/without-pixi/">its docs</a> cover the route for each ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c10b8b78f021" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hole In Your SBOM]]></title>
            <link>https://medium.com/@millsks/the-hole-in-your-sbom-a653b473147f?source=rss-32035d9bb238------2</link>
            <guid isPermaLink="false">https://medium.com/p/a653b473147f</guid>
            <category><![CDATA[software-supply-chain]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sbom]]></category>
            <dc:creator><![CDATA[Kevin Mills]]></dc:creator>
            <pubDate>Wed, 30 Sep 2026 02:41:46 GMT</pubDate>
            <atom:updated>2026-09-30T02:41:46.185Z</atom:updated>
            <content:encoded><![CDATA[<p>Your scanner found nothing in your conda environment. That is not the same as there being nothing to find.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rE9z-NMX5oDbBSjbBSMzGA.png" /><figcaption>From lockfile to visibility: pixi-sbom turns a project’s dependencies into a structured Software Bill of Materials.</figcaption></figure><p>Software bills of materials are turning up in contracts, audits and regulations. If you build with conda or pixi, the one your tooling produced may be describing about half of your software.</p><p>Most organizations of any size have a tool that produces software bills of materials. The one we are supposed to use knows very little about conda environments and nothing at all about pixi workspaces.</p><p>That is not really a complaint about a vendor. Coverage has to stop somewhere, and conda is a smaller world than npm or Maven. It is a description of a gap, and the gap matters more than its size suggests, because of the particular way these documents fail.</p><p>A missing document is a visible problem. Somebody notices the empty field and chases it. A document that is present, well formed, valid against its schema and hollow does not get chased. It gets filed, and everyone downstream treats it as an answer.</p><p>So I wrote a tool. Before I get to it, it is worth being precise about what these documents are and what they are for, because a lot of the writing on the subject treats them as a compliance chore and the rest treats them as a security product. They are neither.</p><h3>What a software bill of materials actually is</h3><p>It is an inventory. That is genuinely the whole idea. For every piece of software that goes into the thing you ship, you record what it is, which version, where it came from, and how it relates to everything else. The name is borrowed from manufacturing, where a bill of materials lists every part in an assembly, and the analogy holds up better than most borrowed metaphors.</p><p>The useful ones carry a few specific things. A name and a version, obviously. A supplier. Cryptographic hashes so you can tell whether the thing you have matches the thing that was described. License information. Dependency relationships, so you can see that your application depends on a library that depends on another library. And metadata about the document itself: who generated it, when, and with what.</p><p>That last part sounds like bureaucracy and is not. An inventory with no timestamp and no author is an assertion with nobody behind it.</p><p>The most quoted definition of the minimum contents came from the US National Telecommunications and Information Administration in 2021. That baseline was replaced on 29 July 2026, when CISA published its own minimum elements: seventeen data fields, nine describing the document and eight describing each component, plus six practices covering how the thing is generated, maintained and delivered. Seventeen agencies co-signed it, seven of them European national cyber security bodies, which tells you something about where this is heading.</p><h3>What it gets you, and what it does not</h3><p>The honest case for an inventory is unglamorous. When a serious vulnerability lands in a widely used library, the question every organization has to answer is whether they are exposed. Without an inventory that question is answered by engineers grepping through build systems for a few days. With a good one it is a query.</p><p>That is the whole value proposition and it is enough. An SBOM is not a scanner. It does not find vulnerabilities, it does not fix anything, and it has no opinion about your risk. It is the input that lets other tools do those jobs.</p><p>Which leads to the part that is easy to miss. An inventory is only as useful as its identifiers. If your document lists a component as some internal string that no vulnerability database has ever heard of, then a scanner reading it finds nothing, reports nothing, and everybody concludes there is nothing to find.</p><blockquote><em>A document that looks complete and cannot be queried is worse than no document, because it looks like it worked.</em></blockquote><p>This is where package URLs come in. A purl is a short, standard string that names a package unambiguously: pkg:pypi/requests@2.34.2 says PyPI, the package named requests, that version. Vulnerability databases key off them. Scanners match on them. They are the join key between your inventory and everything that might tell you something about it.</p><h3>The flavors, and the version numbers that matter</h3><p>There are two formats worth knowing about, and they are not really competing so much as serving slightly different crowds.</p><p><strong>CycloneDX</strong> comes from OWASP and was designed for security use from the start. It is compact, it is what most vulnerability scanners ingest most happily, and it has first class support for vulnerability data and for VEX. The current versions are 1.6 and 1.7.</p><p><strong>SPDX</strong> comes from the Linux Foundation, is an ISO standard, and grew out of license compliance work. It is more verbose and more precise about licensing, which makes it the format procurement and legal teams tend to ask for. Version 2.3 is the widely supported one. Version 3.0.1 restructured the whole thing into a graph of typed elements and added profiles, including one for security data.</p><p>If you have to pick one without knowing the consumer, CycloneDX 1.6 is the safer default, because the tools that will read it are more likely to accept it. If somebody has told you what they want, give them what they asked for.</p><p>There is a third artifact that is frequently confused with the first two. <strong>VEX</strong>, the Vulnerability Exploitability eXchange, is not an inventory. It is a statement about whether a particular vulnerability actually affects a particular product, which is how you say “yes that CVE is in there, no it is not reachable in our configuration, here is why” in a form a machine can read. Germany’s BSI, whose technical guideline has become the working baseline for European compliance, is explicit that vulnerability information does not belong inside the SBOM at all, on the grounds that a bill of materials describes a fixed composition while vulnerability status changes constantly. That is a sound distinction and more tools should respect it.</p><h3>Who is actually asking for these</h3><p>It is worth being specific here, because the impression that regulation is uniformly tightening is not quite right. In some places it has loosened.</p><p>In US federal procurement, the mandatory self attestation memos that had required software vendors to confirm secure development practices were rescinded in January 2026 by OMB memorandum M-26–05, which moved agencies to a risk based approach of their own design. Attestation became a thing agencies may ask for rather than a thing every vendor must file.</p><p>What did not loosen is anything statutory. Section 524B of the Federal Food, Drug, and Cosmetic Act requires a software bill of materials in premarket submissions for cyber devices, and the FDA has held refuse to accept authority for inadequate cybersecurity information since October 2023. If you make medical devices, this is law and not guidance.</p><p>The underlying framework most enterprise programs actually map to is NIST’s Secure Software Development Framework, SP 800–218. Practice PS.3.2 is about as direct as standards documents get:</p><blockquote><em>Collect, safeguard, maintain, and share provenance data for all components of each software release (e.g., in a software bill of materials [SBOM]).</em></blockquote><p>Financial services is where I find the most interesting requirement, because it never uses the word. PCI DSS 4.0, requirement 6.3.2, applies to anyone handling card data and has been enforced since March 2025:</p><blockquote><em>An inventory of bespoke and custom software, and third-party software components incorporated into bespoke and custom software is maintained to facilitate vulnerability and patch management.</em></blockquote><p>Read that last clause again. Not maintained. Maintained <em>to facilitate vulnerability and patch management</em>. An assessor is entitled to ask whether your inventory actually serves that purpose, and a list of components that no scanner can match against does not. The standard has the thesis of this article built into its own wording.</p><p>Banks have plenty of company in the same direction. DORA has applied to European financial entities since January 2025 and requires them to identify and inventory their ICT assets and to manage third party risk actively. New York’s Department of Financial Services Part 500 requires asset inventories with similar intent. None of these say “SBOM” either, and all of them describe one.</p><p>In Europe more broadly, the Cyber Resilience Act sets the clock. Reporting obligations under Article 14 began on 11 September 2026. The SBOM obligation itself applies from 11 December 2027. The regulation does not name a format, but the BSI technical guideline that has become the de facto baseline accepts CycloneDX 1.6 or higher, or SPDX 3.0.1 or higher, serialized as JSON or XML.</p><h3>The hole, specifically</h3><p>Here is the problem I actually ran into, stated plainly.</p><p>A pixi environment is conda packages and PyPI packages in the same lockfile. That combination is the entire point of the tool. Scientific Python is built this way: the numerical libraries and the compiled dependencies come from conda-forge, the pure Python parts come from PyPI, and pixi resolves the lot into one reproducible environment.</p><p>Most SBOM tooling understands one of those ecosystems. Point a Python oriented scanner at the project and it reads a requirements file if it can find one, misses everything conda installed, and reports confidently on a minority of your software. Point a conda aware tool at it and the PyPI half goes missing instead.</p><p>Even when a tool does emit conda packages, it usually emits them as pkg:conda/numpy@2.3.1. That is a correct purl. It is also one that essentially no vulnerability database will match, because advisories for numpy are filed against PyPI. Your document has the package, with the right version, and the query still returns nothing.</p><p>So you get an inventory that is structurally valid, passes whatever automated check the other side runs, and is functionally empty. Nobody is lying. The tool did what it does. It simply has no model of the thing you built.</p><h3>What I built</h3><p>pixi-sbom is a pixi extension. It reads a pixi.lock and writes a CycloneDX or SPDX document, and the part that took the actual work is getting the identifiers right.</p><pre>pixi global install pixi-sbom<br>pixi sbom</pre><p>That gives you sbom.cdx.json. Add --format spdx --spec-version 3.0 if that is what the other side wants.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_JKcOk2rzSZm370-E8ZNQ.gif" /><figcaption>A lockfile in, documents out, and a gate that fails a build.</figcaption></figure><p>Rather than describe the output, here is some of it. This is real, trimmed only by removing entries of the same shape. Two packages from one environment, one installed by conda and one from PyPI:</p><pre>{<br>  &quot;bomFormat&quot;: &quot;CycloneDX&quot;,<br>  &quot;specVersion&quot;: &quot;1.6&quot;,<br>  &quot;metadata&quot;: {<br>    &quot;timestamp&quot;: &quot;2026-09-29T14:02:11Z&quot;,<br>    &quot;tools&quot;: { &quot;components&quot;: [ { &quot;type&quot;: &quot;application&quot;, &quot;name&quot;: &quot;pixi-sbom&quot;, &quot;version&quot;: &quot;1.0.0&quot; } ] },<br>    &quot;component&quot;: { &quot;type&quot;: &quot;application&quot;, &quot;name&quot;: &quot;pixi-sbom&quot;, &quot;version&quot;: &quot;1.0.0&quot; }<br>  },<br>  &quot;components&quot;: [<br>    {<br>      &quot;type&quot;: &quot;library&quot;,<br>      &quot;name&quot;: &quot;click&quot;,<br>      &quot;version&quot;: &quot;8.5.0&quot;,<br>      &quot;supplier&quot;: { &quot;name&quot;: &quot;conda-forge&quot;, &quot;url&quot;: [&quot;https://conda.anaconda.org/conda-forge/&quot;] },<br>      &quot;purl&quot;: &quot;pkg:conda/click@8.5.0?build=pyh5ded981_0&amp;channel=conda-forge&amp;subdir=noarch&amp;type=conda&quot;,<br>      &quot;licenses&quot;: [ { &quot;expression&quot;: &quot;BSD-3-Clause&quot; } ],<br>      &quot;externalReferences&quot;: [<br>        { &quot;type&quot;: &quot;distribution&quot;, &quot;url&quot;: &quot;https://conda.anaconda.org/conda-forge/noarch/click-8.5.0-pyh5ded981_0.conda&quot; },<br>        { &quot;type&quot;: &quot;vcs&quot;, &quot;url&quot;: &quot;https://github.com/pallets/click&quot; }<br>      ],<br>      &quot;properties&quot;: [<br>        { &quot;name&quot;: &quot;pixi:kind&quot;, &quot;value&quot;: &quot;conda&quot; },<br>        { &quot;name&quot;: &quot;pixi:channel&quot;, &quot;value&quot;: &quot;conda-forge&quot; },<br>        { &quot;name&quot;: &quot;pixi:purl&quot;, &quot;value&quot;: &quot;pkg:pypi/click@8.5.0?source=compressed-mapping&quot; }<br>      ]<br>    },<br>    {<br>      &quot;type&quot;: &quot;library&quot;,<br>      &quot;name&quot;: &quot;mkdocs&quot;,<br>      &quot;version&quot;: &quot;1.6.1&quot;,<br>      &quot;supplier&quot;: { &quot;name&quot;: &quot;pypi.org&quot;, &quot;url&quot;: [&quot;https://pypi.org/simple&quot;] },<br>      &quot;purl&quot;: &quot;pkg:pypi/mkdocs@1.6.1&quot;,<br>      &quot;licenses&quot;: [ { &quot;expression&quot;: &quot;BSD-2-Clause&quot; } ],<br>      &quot;externalReferences&quot;: [<br>        { &quot;type&quot;: &quot;distribution&quot;, &quot;url&quot;: &quot;https://files.pythonhosted.org/packages/22/5b/.../mkdocs-1.6.1-py3-none-any.whl&quot; },<br>        { &quot;type&quot;: &quot;vcs&quot;, &quot;url&quot;: &quot;https://github.com/mkdocs/mkdocs&quot; }<br>      ],<br>      &quot;properties&quot;: [<br>        { &quot;name&quot;: &quot;pixi:kind&quot;, &quot;value&quot;: &quot;pypi&quot; },<br>        { &quot;name&quot;: &quot;pixi:index-url&quot;, &quot;value&quot;: &quot;https://pypi.org/simple&quot; }<br>      ]<br>    }<br>  ]<br>}</pre><p>The conda package is the interesting one. Its primary purl is the conda purl, which is correct and which no advisory database will match. Underneath it, pixi:purl carries pkg:pypi/click@8.5.0, and that one matches. Both facts are true at once and the document keeps both, so a reader that only understands conda and a scanner that only understands PyPI each find what they need in the same file.</p><p>The mkdocs entry beside it is an ordinary PyPI package. Nothing about the document treats one ecosystem as the real one and the other as an afterthought. They sit in the same array with the same fields filled in.</p><p>When you ask for vulnerabilities, they arrive attached to the purl that matched:</p><pre>&quot;vulnerabilities&quot;: [<br>  {<br>    &quot;bom-ref&quot;: &quot;vuln-GHSA-q2q7-5pp4-w6pg&quot;,<br>    &quot;id&quot;: &quot;GHSA-q2q7-5pp4-w6pg&quot;,<br>    &quot;source&quot;: { &quot;name&quot;: &quot;OSV&quot;, &quot;url&quot;: &quot;https://osv.dev/vulnerability/GHSA-q2q7-5pp4-w6pg&quot; },<br>    &quot;ratings&quot;: [<br>      { &quot;source&quot;: { &quot;name&quot;: &quot;OSV&quot; }, &quot;score&quot;: 7.5, &quot;severity&quot;: &quot;high&quot;,<br>        &quot;method&quot;: &quot;CVSSv31&quot;, &quot;vector&quot;: &quot;CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H&quot; },<br>      { &quot;source&quot;: { &quot;name&quot;: &quot;CISA KEV&quot; }, &quot;severity&quot;: &quot;critical&quot;, &quot;method&quot;: &quot;other&quot; }<br>    ],<br>    &quot;cwes&quot;: [ 400 ],<br>    &quot;recommendation&quot;: &quot;Upgrade urllib3 to 1.26.5&quot;,<br>    &quot;affects&quot;: [ { &quot;ref&quot;: &quot;pkg:pypi/urllib3@1.26.4&quot; } ],<br>    &quot;properties&quot;: [<br>      { &quot;name&quot;: &quot;pixi:kev&quot;, &quot;value&quot;: &quot;true&quot; },<br>      { &quot;name&quot;: &quot;pixi:kev-cve&quot;, &quot;value&quot;: &quot;CVE-2021-33503&quot; },<br>      { &quot;name&quot;: &quot;pixi:kev-date-added&quot;, &quot;value&quot;: &quot;2026-09-01&quot; }<br>    ]<br>  }<br>]</pre><p>Note the second rating. The CVSS score from OSV says high. The entry in CISA’s Known Exploited Vulnerabilities catalog raises it to critical, because something being exploited in the wild is a different question from how bad it would be if it were. Both ratings stay in the document rather than being averaged into one number that answers neither question.</p><h3>All of it lives in the document</h3><p>This is the part I want to be clear about, because the reports in the previous section could give the wrong impression. None of that data is report-only. The licenses, the findings and the KEV flags are fields in the document itself, which is the artifact you hand to somebody else. One command produces all of it:</p><pre>pixi sbom --fetch-licenses --license-texts \<br>          --vulnerabilities osv --kev \<br>          --output sbom.cdx.json</pre><p>Licenses arrive with their provenance attached. Where a package declares one in the lockfile that is what is recorded. Where it does not, the license is read out of the package itself, and the document says which, because “MIT according to the lockfile” and “MIT according to a file inside the wheel” are different strengths of claim. With --license-texts the full text comes along, which is what compliance reviews generally want and what a bare identifier cannot give them:</p><pre>{<br>  &quot;type&quot;: &quot;library&quot;,<br>  &quot;name&quot;: &quot;bzip2&quot;,<br>  &quot;version&quot;: &quot;1.0.8&quot;,<br>  &quot;purl&quot;: &quot;pkg:conda/bzip2@1.0.8?build=h4bc722e_7&amp;channel=conda-forge&amp;subdir=linux-64&amp;type=conda&quot;,<br>  &quot;licenses&quot;: [<br>    {<br>      &quot;license&quot;: {<br>        &quot;id&quot;: &quot;bzip2-1.0.6&quot;,<br>        &quot;text&quot;: {<br>          &quot;contentType&quot;: &quot;text/plain&quot;,<br>          &quot;content&quot;: &quot;\n------------------------------------------------------------\nThis program, \&quot;bzip2\&quot;, the associated library \&quot;libbzip2\&quot; ...\n&quot;<br>        }<br>      }<br>    }<br>  ],<br>  &quot;properties&quot;: [<br>    { &quot;name&quot;: &quot;pixi:license-family&quot;, &quot;value&quot;: &quot;BSD&quot; },<br>    { &quot;name&quot;: &quot;pixi:license-files-source&quot;, &quot;value&quot;: &quot;conda-archive&quot; }<br>  ]<br>}</pre><p>The text there was pulled out of the conda archive on conda-forge, and pixi:license-files-source says so. For a wheel the same field reads wheel. You can tell where every license claim came from without taking anyone&#39;s word for it.</p><p>The KEV data is likewise a set of fields rather than a footnote. The catalog entry carries a remediation due date, and that date is in the document:</p><pre>&quot;properties&quot;: [<br>  { &quot;name&quot;: &quot;pixi:kev&quot;, &quot;value&quot;: &quot;true&quot; },<br>  { &quot;name&quot;: &quot;pixi:kev-cve&quot;, &quot;value&quot;: &quot;CVE-2021-33503&quot; },<br>  { &quot;name&quot;: &quot;pixi:kev-date-added&quot;, &quot;value&quot;: &quot;2026-09-01&quot; },<br>  { &quot;name&quot;: &quot;pixi:kev-due-date&quot;, &quot;value&quot;: &quot;2026-09-22&quot; },<br>  { &quot;name&quot;: &quot;pixi:kev-ransomware&quot;, &quot;value&quot;: &quot;false&quot; }<br>]</pre><p>Which matters because the due date is the part somebody downstream has to act on. A report that prints it to a terminal helps whoever ran the command. A field in the document helps whoever receives it three weeks later, which is usually a different person.</p><p>SPDX gets the same treatment where the format allows it. SPDX 2.3 has nowhere to record a vulnerability, and the tool says so on standard error rather than quietly dropping the data. SPDX 3.0.1 has a security profile, so the findings come out as security_Vulnerability elements with CVSS and exploit-catalog assessments attached, and the document declares that it conforms to that profile.</p><p>Which is worth squaring with something I said earlier. The BSI guideline is explicit that vulnerability data does not belong inside a bill of materials, on the grounds that a composition is fixed and a vulnerability status is not. That is a sound rule, and the default respects it: a plain pixi sbom records no findings at all, and you have to ask for them. Asking is reasonable when the document is going into your own pipeline, where one file is easier to move around than three. When it is going to somebody else, --vex writes the assessments to their own document and leaves the inventory describing nothing but what is installed. Two different consumers, two different shapes, and the distinction is yours to make rather than the tool&#39;s to make for you.</p><p>Conda packages get their PyPI identity two ways. Where pixi has already recorded one in the lockfile, which it does for any environment with PyPI dependencies, that is used. Where it has not, the conda-forge mapping that pixi itself uses is consulted. The result is that the numpy in your conda environment comes out carrying pkg:pypi/numpy@2.3.1 alongside its conda purl, and a scanner reading the document finds the advisories that apply to it.</p><p>That sounds like a small detail. It is most of the value.</p><p>Both document families are written to their current versions, CycloneDX 1.6 and 1.7, SPDX 2.3 and 3.0.1, and each one is validated against its own published schema in continuous integration rather than on my say so. Since the European baseline names 1.6 and 3.0.1 specifically, that is not an accident of scope.</p><h3>Past the document itself</h3><p>Generating a file is the easy half. The harder question is what you do with it on a Tuesday.</p><p>There are eight terminal reports. They print rather than writing a document, and each answers a question you would otherwise answer by reading JSON. All of them are trimmed below, because the real ones run to a screen or more. The commands are exactly what produced them.</p><p><strong>The inventory.</strong> What is in here, where it came from, and which environment asked for it. The Declared column separates what the workspace actually requested from what arrived as a dependency of something else.</p><pre>$ pixi sbom --report packages<br>Name       Version    Kind   Declared  Source       License       Yanked  Purl<br>------------------------------------------------------------------------------------------------<br>python     3.12.14    conda  default   conda-forge  Python-2.0    -       pkg:conda/python@3.12.14<br>requests   2.34.2     pypi   web       pypi.org     -             -       pkg:pypi/requests@2.34.2<br>six        1.17.0     pypi   default   pypi.org     -             -       pkg:pypi/six@1.17.0<br>urllib3    1.26.4     pypi   -         pypi.org     -             -       pkg:pypi/urllib3@1.26.4</pre><pre>Summary: 30 packages, 3 declared by the workspace<br>Declared but not in this environment: none</pre><p><strong>Licenses.</strong> The Source column is the part that matters: whether the license came from the lockfile or had to be fetched out of the package itself. A license nobody can trace is worth less than one you can.</p><pre>$ pixi sbom --fetch-licenses --report licenses<br>Name              Version    Kind   License       Family  Source    Files<br>-------------------------------------------------------------------------<br>bzip2             1.0.8      conda  bzip2-1.0.6   BSD     lockfile  1<br>ca-certificates   2026.7.22  conda  ISC           -       lockfile  1<br>ld_impl_linux-64  2.46.1     conda  GPL-3.0-only  GPL     lockfile  4<br>libexpat          2.8.1      conda  MIT           MIT     lockfile  1</pre><pre>No license: none<br>Not an SPDX expression: none</pre><p><strong>Vulnerabilities.</strong> Worst first, with a column saying whether CISA lists the advisory as known to be exploited. That flag is why the top row reads critical when its CVSS score is 7.5.</p><pre>$ pixi sbom --vulnerabilities osv --kev --report vulnerabilities<br>Package  Version  Severity  Score  KEV  ID                   Fixed   Status  Summary<br>-------------------------------------------------------------------------------------------<br>urllib3  1.26.4   critical  7.5    yes  GHSA-q2q7-5pp4-w6pg  1.26.5  open    Catastrophic<br>                                                                             backtracking in URL<br>                                                                             authority parser</pre><pre>Summary: 9 findings in 1 packages<br>Severity  Findings<br>------------------<br>critical  1<br>high      5<br>medium    3</pre><pre>Known exploited (CISA KEV) (1):<br>  GHSA-q2q7-5pp4-w6pg (CVE-2021-33503, due 2026-09-22)</pre><p><strong>The diff.</strong> I expected to use this least and use it most. It answers what changed since the last release without reading either document, and it will compare against a lockfile or an installed environment just as readily as against another document.</p><p>A version bump is the obvious case and the least interesting one. The rest are the ones that tend to go unnoticed: a package that quietly appeared as somebody else’s dependency, one that left, a license that changed under a version that did not, and a conda package rebuilt against different dependencies while keeping its version number. That last row is invisible to anything comparing version strings.</p><pre>$ pixi sbom --fetch-licenses --report diff --against previous.cdx.json<br>Change   Package   Kind   Before      After<br>--------------------------------------------------<br>added    certifi   pypi   -           2026.7.22<br>removed  chardet   pypi   5.2.0       -<br>version  urllib3   pypi   2.8.0       1.26.4<br>license  idna      pypi   Apache-2.0  BSD-3-Clause<br>build    libexpat  conda  h5888daf_0  hecca717_1</pre><pre>Against previous.cdx.json (CycloneDX 1.6): 1 added, 1 removed, 1 version changes,<br>1 license changes, 1 build changes, 26 unchanged</pre><p><strong>Drift.</strong> How far behind the locked versions have fallen, counted in releases and in days, with the size of the step each one represents.</p><pre>$ pixi sbom --report outdated<br>Package    Kind   Version  Age    Latest   Released    Behind  Step<br>-------------------------------------------------------------------<br>urllib3    pypi   1.26.4   2024d  2.8.0    2026-09-15  36      major<br>python     conda  3.12.14  39d    3.14.7   2026-08-19  22      minor<br>openssl    conda  3.6.4    35d    4.0.3    2026-09-29  3       major<br>libexpat   conda  2.8.1    132d   2.8.5    2026-09-25  2       patch</pre><pre>Summary: 7 of 30 packages behind their index</pre><p><strong>Python compatibility.</strong> Which interpreter versions the locked packages actually permit, and which one of them is holding the ceiling down. Useful before an upgrade, when the question is what is stopping you.</p><pre>$ pixi sbom --report python<br>Package             Version    Requires-Python                   Satisfied  Ceiling<br>-----------------------------------------------------------------------------------<br>requests            2.34.2     &gt;=3.10                            yes        -<br>six                 1.17.0     &gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*  yes        -<br>urllib3             1.26.4     &gt;=3.10                            yes        -</pre><pre>Summary: interpreter 3.12, highest Python these packages allow: unbounded<br>Holding the ceiling: none<br>Not satisfied by this interpreter: none</pre><p><strong>What the code imports.</strong> A phantom is something your code imports that the manifest never declared. It works right up until the transitive path that supplied it goes away. The inverse is a package you declared that nothing imports.</p><pre>$ pixi sbom --report phantom<br>Finding  Package  Kind  Version  Modules  Imported by<br>-----------------------------------------------------<br>phantom  urllib3  pypi  1.26.4   urllib3  app.py<br>unused   six      pypi  1.17.0   six      -</pre><pre>Summary: 1 phantom, 0 undeclared, 1 unused<br>Read 1 Python file importing 4 modules</pre><p><strong>Maintenance.</strong> OpenSSF Scorecard ratings for each dependency’s repository, with the checks each scored worst on. This is the report I would treat with the most caution, because a low score often means a small project rather than a careless one.</p><pre>$ pixi sbom --fetch-licenses --scorecard --report scorecard<br>Package   Version  Score  Scored      Weakest checks<br>--------------------------------------------------------------------------------<br>tzdata    2026c    3.5    2026-09-28  Branch-Protection (0.0), CII-Best-Practices (0.0),<br>                                      Code-Review (0.0), Fuzzing (0.0), SAST (0.0)<br>libzlib   1.3.2    4.2    2026-09-01  Signed-Releases (0.0), Pinned-Dependencies (3.0)</pre><pre>Summary: 14 repositories scored, 16 with none<br>Below 5.0 (4): tzdata (3.5), libzlib (4.2), libffi (4.4), libsqlite (4.5)</pre><p>Several of those reports can fail a build. A license policy violation exits 3. A vulnerability at or above a severity you named exits 4. A dependency that fell below an OpenSSF threshold exits 9. The document is still written in every case, and what tripped the gate is listed on standard error, so a pipeline fails with a reason rather than with a grep.</p><p>VEX comes out as its own document rather than being folded into the inventory, which is the shape the BSI guideline asks for. There is a GitHub Action, SARIF output for code scanning, and signed build provenance on every release binary.</p><h3>What it is not</h3><p>It is not a scanner. It produces the input a scanner consumes, and where it reports vulnerabilities it is relaying what OSV said, not forming its own view.</p><p>It does not execute anything from a package. Archives are read, never installed, and no build script or entry point runs. For a tool that exists to be pointed at dependencies you have not audited, that seemed worth guaranteeing rather than assuming.</p><p>And it is not a general purpose conda SBOM tool. It understands pixi workspaces, installed prefixes, and documents produced by other tools. If your environment was not built with pixi, there are better places to look.</p><h3>If you want to try it</h3><p>The install is one line and it needs no configuration to produce something useful. If you already have a pixi project, the whole evaluation takes about a minute.</p><pre>pixi global install pixi-sbom<br>cd your-project<br>pixi sbom --report packages</pre><p>If the output describes your environment accurately, the document will too. If it does not, I would genuinely like to know, because that is the part worth getting right.</p><p>pixi-sbom is open source under Apache 2.0.<br>Documentation: <a href="https://millsks.github.io/pixi-sbom/">millsks.github.io/pixi-sbom</a><br>Source: <a href="https://github.com/millsks/pixi-sbom">github.com/millsks/pixi-sbom</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a653b473147f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Commit Messages to Automated Changelogs: Why I Built a Conventional Commit Hook for Python]]></title>
            <link>https://medium.com/@millsks/from-commit-messages-to-automated-changelogs-why-i-built-a-conventional-commit-hook-for-python-8bbe9b8c1dfd?source=rss-32035d9bb238------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bbe9b8c1dfd</guid>
            <category><![CDATA[pre-commit-hook]]></category>
            <category><![CDATA[changelog]]></category>
            <category><![CDATA[git-commit-format]]></category>
            <category><![CDATA[conventional-commits]]></category>
            <category><![CDATA[pre-commit]]></category>
            <dc:creator><![CDATA[Kevin Mills]]></dc:creator>
            <pubDate>Sun, 21 Jun 2026 15:58:39 GMT</pubDate>
            <atom:updated>2026-06-21T15:58:39.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Infographic showing Git commit nodes with conventional types like feat and fix transforming into a formatted changelog document." src="https://cdn-images-1.medium.com/max/1024/1*1izCQboWIvzzeW0JUVQ4xQ.png" /><figcaption><em>Turning Git commits into an API for your project’s history.</em></figcaption></figure><p>Most developers have a complicated relationship with changelogs.</p><p>We know they’re valuable. Users appreciate them. Future maintainers rely on them. Yet maintaining them consistently is often one of the first things to fall by the wayside when a project gets busy.</p><p>After working on multiple software projects, I found myself asking a simple question:</p><blockquote><em>What if the Git commit history itself could become the source of truth for changelogs and release notes?</em></blockquote><p>That question led me down the path of Conventional Commits, automated changelog generation with tools like git-cliff, and ultimately to building my own Python project: <a href="https://github.com/millsks/conventional-commit-hook">conventional-commit-hook</a>.</p><p>This article explores why Conventional Commits matter, how they enable automated changelog generation, the alternatives that exist, and what motivated me to create a new commit message validation hook for Python projects.</p><h3>The Problem with Traditional Changelogs</h3><p>Many teams still maintain changelogs manually.</p><p>A typical release workflow looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*mKd_4VVv_YWHih6yfM8ECg.png" /></figure><p>The problem is that the final step is often forgotten, and when it isn’t, the context for each change has long since evaporated from memory.</p><p>Over time, changelogs become:</p><ul><li>Incomplete</li><li>Inconsistent</li><li>Outdated</li><li>Difficult to maintain</li></ul><p>Meanwhile, Git already contains a detailed record of every change that occurred throughout the project’s history. The challenge isn’t collecting information — it’s transforming that information into structured release documentation.</p><p>That’s where <a href="https://www.conventionalcommits.org/">Conventional Commits</a> enter the picture.</p><h3>Enter Conventional Commits</h3><p>The <a href="https://www.conventionalcommits.org/en/v1.0.0/">Conventional Commits specification</a> defines a standard format for commit messages.</p><p>Instead of writing something like:</p><pre>fixed login bug</pre><p>You write:</p><pre>fix(auth): resolve null pointer exception during login</pre><p>Or:</p><pre>feat(api): add OAuth2 authentication support</pre><p>Or:</p><pre>feat!: remove legacy v1 endpoints</pre><p>Each commit message follows a structured format that communicates important metadata at a glance.</p><h3>Anatomy of a Conventional Commit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2rE7WDZpf2O1S8i0PHrxA.png" /></figure><p>The metadata encoded in each commit:</p><ul><li><strong>type</strong> — the category of change (feat, fix, docs, refactor, etc.)</li><li><strong>scope</strong> — which part of the codebase was affected (optional)</li><li><strong>!</strong> — signals a breaking change directly in the header (optional)</li><li><strong>description</strong> — a concise summary in the imperative mood</li><li><strong>body</strong> — detailed context about the change (optional)</li><li><strong>footers</strong> — structured metadata including BREAKING CHANGE (optional)</li></ul><h3>The 11 Standard Types</h3><p>The <a href="https://www.conventionalcommits.org/en/v1.0.0/#specification">Conventional Commits specification</a> defines the feat and fix types explicitly, with BREAKING CHANGE as a special footer. The broader ecosystem has converged on 11 commonly used types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*225qots_z5Urs559AzHP_Q.png" /></figure><h3>Turning Commit History into Changelogs</h3><p>One of the most compelling tools in the Conventional Commits ecosystem is <a href="https://git-cliff.org/">git-cliff</a>.</p><p>Rather than manually maintaining release notes, <a href="https://git-cliff.org/">git-cliff</a> analyzes commit history and generates changelog entries directly from commit messages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*0_IJE4bMhO6-ZtlHghEMfQ.png" /></figure><p>The benefits are significant:</p><ul><li>Automated changelog generation tied directly to commit history</li><li>Consistent release notes with zero manual effort</li><li>Accurate historical records with proper categorization</li><li>Faster release preparation</li><li>Breaking changes surfaced automatically from BREAKING CHANGE footers</li></ul><p>But this pipeline only works if the commit messages themselves are structured correctly. A single unformatted commit breaks the pattern. That’s why enforcement at commit time matters.</p><h3>How the Pre-commit Hook Fits In</h3><p>The <a href="https://pre-commit.com/">pre-commit</a> framework provides a standardized way to run checks before a commit is accepted. A commit-msg hook runs after the developer writes a commit message but before Git records the commit permanently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*15MvymRjF7iq9yfLaOuDzg.png" /></figure><p>The hook catches formatting problems immediately, before they accumulate in history and before a developer has moved on to the next task.</p><h3>The Full Commit-to-Release Pipeline</h3><p>Putting the pieces together, a project using Conventional Commits, <a href="https://pre-commit.com/">pre-commit</a>, and <a href="https://git-cliff.org/">git-cliff</a> gets an end-to-end pipeline from commit message to release documentation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*vixtetLTBXeDkhbZuGHYEQ.png" /></figure><p>Each step is automated. The only human input required is writing a well-formed commit message — something the hook enforces at the point of commit.</p><h3>The Open Source Ecosystem: Alternatives and Prior Art</h3><p><a href="https://github.com/millsks/conventional-commit-hook">conventional-commit-hook</a> is <a href="https://github.com/millsks/conventional-commit-hook/blob/main/LICENSE">MIT licensed</a> and fully open source — contributions, forks, and adaptations are welcome. It is one of several tools in a healthy ecosystem that addresses the same problem from different angles.</p><h4>Tools in This Space</h4><p>The open source community has built commit message validators across multiple language ecosystems. Choosing the right tool depends on which ecosystem you work in, how you manage git hooks, and how much flexibility you need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*XB6sfesxzipcXP3CK7G3XA.png" /><figcaption>Links for each tool are in the sections below.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*Ng5EL6OldP95OA-62Te4NQ.png" /></figure><h3>The Node.js Ecosystem: commitlint + Husky</h3><p>The most widely adopted combination in JavaScript projects is <a href="https://commitlint.js.org/">commitlint</a> paired with <a href="https://typicode.github.io/husky/">Husky</a>. Commitlint is highly configurable — teams add @commitlint/config-conventional to enforce the same Conventional Commits rules, and Husky manages the git hook wiring. It is the de facto standard for Node.js monorepos and frontend projects.</p><p>For Python projects, pulling in a Node.js runtime solely to validate commit messages is an uncomfortable dependency. That friction motivates a Python-native alternative.</p><h3>The Python Landscape</h3><p><a href="https://jorisroovers.com/gitlint/">gitlint</a> is a flexible, rule-based Python commit message linter. It supports custom rules and works well as a general-purpose linter, but enforcing the full Conventional Commits spec requires additional configuration rather than being available out of the box.</p><p><a href="https://commitizen-tools.github.io/commitizen/">commitizen</a> takes a different angle: instead of validating a message after the developer types it, it guides the developer through an interactive prompt to construct a valid commit. It also handles version bumping tied to commit types. It is a richer tool but changes the commit workflow more significantly and requires more setup.</p><h3>The Rust-Based All-in-One: Cocogitto</h3><p><a href="https://docs.cocogitto.io/">Cocogitto</a> (cog) is a Rust-based toolchain that handles linting, changelog generation, and semantic versioning in a single binary. It is cross-platform and fast. If you want one tool that owns the entire Conventional Commits workflow without wiring together pre-commit + git-cliff separately, Cocogitto is worth evaluating.</p><h3>Prior Art: matthorgan’s pre-commit-conventional-commits</h3><p>One important influence on this project is <a href="https://github.com/matthorgan/pre-commit-conventional-commits">pre-commit-conventional-commits</a> by matthorgan. It demonstrated that commit message validation could be delivered as a focused <a href="https://pre-commit.com/">pre-commit</a> hook for Python projects without heavy dependencies — the same model that conventional-commit-hook follows.</p><p>Development activity on that project had slowed by the time I started building this, which is common for stable open source tools that reach feature completeness. That wasn’t a criticism — it was the gap I wanted to fill with an actively maintained alternative.</p><h3>Why I Built conventional-commit-hook</h3><p>With all these alternatives available, the motivation behind <a href="https://github.com/millsks/conventional-commit-hook">conventional-commit-hook</a> was specific: I wanted a lightweight, actively maintained commit message validator designed for modern Python development workflows — one that installs cleanly from both <a href="https://pypi.org/project/conventional-commit-hook/">PyPI</a> and <a href="https://anaconda.org/conda-forge/conventional-commit-hook">conda-forge</a>, fits naturally into the <a href="https://pre-commit.com/">pre-commit</a> framework, and requires no Node.js or Rust toolchain.</p><p>Key design decisions:</p><ul><li><strong>Silent on success</strong> — no output when the commit message is valid; noise only on failure</li><li><strong>Single runtime dependency</strong> — <a href="https://www.structlog.org/">structlog</a> for structured, machine-parseable error output to stderr</li><li><strong>Full spec support</strong> — breaking change detection from both the ! header marker and BREAKING CHANGE footer token</li><li><strong>Custom type overrides</strong> — the --types argument lets teams define their own allowed type set</li><li><strong>Available on both </strong><a href="https://pypi.org/project/conventional-commit-hook/"><strong>PyPI</strong></a><strong> and </strong><a href="https://anaconda.org/conda-forge/conventional-commit-hook"><strong>conda-forge</strong></a> — fitting into conda-based Python workflows in addition to pip-based ones</li></ul><h3>Using the Hook</h3><p>Add it to your .pre-commit-config.yaml:</p><pre>repos:<br>  - repo: https://github.com/millsks/conventional-commit-hook<br>    rev: v0.1.0<br>    hooks:<br>      - id: conventional-commit-hook</pre><p>Install the hook:</p><pre>pre-commit install --hook-type commit-msg</pre><p>To restrict the allowed types to a custom set:</p><pre>hooks:<br>      - id: conventional-commit-hook<br>        args: [--types, feat, fix, hotfix, chore]</pre><h3>Final Thoughts</h3><p><a href="https://www.conventionalcommits.org/">Conventional Commits</a> introduce a small amount of discipline at commit time, but they unlock significant benefits throughout the software delivery lifecycle.</p><p>If changelogs are generated from commit history, then commit history needs to be reliable.</p><p>Git already records what changed. Conventional Commits explain why it changed. Tools like <a href="https://git-cliff.org/">git-cliff</a> transform that information into meaningful release documentation. And a commit hook helps ensure the entire process remains consistent over time.</p><p><strong>GitHub Repository:</strong> <a href="https://github.com/millsks/conventional-commit-hook">https://github.com/millsks/conventional-commit-hook</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bbe9b8c1dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why cookiecutter-django is Essential for Your Next Django Project]]></title>
            <link>https://medium.com/@millsks/why-cookiecutter-django-is-essential-for-your-next-django-project-7d3c00cdce51?source=rss-32035d9bb238------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d3c00cdce51</guid>
            <category><![CDATA[cookiecutter-django]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[framework]]></category>
            <dc:creator><![CDATA[Kevin Mills]]></dc:creator>
            <pubDate>Sun, 04 Aug 2024 17:31:09 GMT</pubDate>
            <atom:updated>2024-08-04T20:57:23.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*G7xxuAxJISUo4_UcMPg2Pg.png" /><figcaption>The power of Django accelerated by the power of the Cookiecutter template engine!</figcaption></figure><h3>Introduction</h3><p><a href="https://www.djangoproject.com/">Django</a> is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It is widely used for building robust and scalable web applications. However, setting up a new Django project can be time-consuming and error-prone. This is where cookiecutter-django comes in. It is a project template for Django that helps you kickstart your project with best practices and a well-structured setup.</p><h3>What is cookiecutter-django?</h3><p><a href="https://github.com/cookiecutter/cookiecutter-django">cookiecutter-django</a> is a project template for Django, created using the Cookiecutter tool. It provides a standardized project structure and includes many useful features and integrations out of the box. Key benefits include:</p><ul><li>Pre-configured settings for different environments</li><li>Built-in support for popular tools and libraries</li><li>Consistent project layout</li></ul><h3>Streamlined Project Setup</h3><p>Setting up a new Django project manually involves creating directories, configuring settings, and installing dependencies. cookiecutter-django automates this process, allowing you to start coding immediately. By answering a few prompts, you can generate a fully functional Django project tailored to your needs.</p><h3>Consistency and Best Practices</h3><p>cookiecutter-django ensures that your project follows Django best practices from the start. It enforces a consistent project structure, making it easier for team members to understand and navigate the codebase. This consistency also helps in maintaining the project over time.</p><h3>Customization and Flexibility</h3><p>One of the strengths of cookiecutter-django is its flexibility. The template is highly customizable, allowing you to choose options that fit your project requirements. Whether you need Docker support, a specific database, or integration with third-party services, cookiecutter-django can be configured to include these features.</p><p>A simple example of a Django project created with cookiecutter can be seen below. A description of each of the template options can be found in the project’s documentation <a href="https://cookiecutter-django.readthedocs.io/en/latest/project-generation-options.html#template-options">here</a>.</p><pre>Cloning into &#39;cookiecutter-django&#39;...<br>remote: Counting objects: 550, done.<br>remote: Compressing objects: 100% (310/310), done.<br>remote: Total 550 (delta 283), reused 479 (delta 222)<br>Receiving objects: 100% (550/550), 127.66 KiB | 58 KiB/s, done.<br>Resolving deltas: 100% (283/283), done.<br>project_name [My Awesome Project]: My First Django Project<br>project_slug [my_first_django_project]: <br>description [Behold My Awesome Project!]: <br>author_name [Daniel Roy Greenfeld]: John Smith<br>domain_name [example.com]: myhost.geocities.net<br>email [daniel-greenfeld@example.com]: jsmith@geocities.net<br>version [0.1.0]: 0.0.1<br>Select open_source_license:<br>1 - MIT<br>2 - BSD<br>3 - GPLv3<br>4 - Apache Software License 2.0<br>5 - Not open source<br>Choose from 1, 2, 3, 4, 5 [1]: 1<br>Select username_type:<br>1 - username<br>2 - email<br>Choose from 1, 2 [1]: 1<br>timezone [UTC]: America/Los_Angeles<br>windows [n]: n<br>Select an editor to use. The choices are:<br>1 - None<br>2 - PyCharm<br>3 - VS Code<br>Choose from 1, 2, 3 [1]: 1<br>use_docker [n]: n<br>Select postgresql_version:<br>1 - 16<br>2 - 15<br>3 - 14<br>4 - 13<br>5 - 12<br>Choose from 1, 2, 3, 4, 5 [1]: 1<br>Select cloud_provider:<br>1 - AWS<br>2 - GCP<br>3 - None<br>Choose from 1, 2, 3 [1]: 1<br>Select mail_service:<br>1 - Mailgun<br>2 - Amazon SES<br>3 - Mailjet<br>4 - Mandrill<br>5 - Postmark<br>6 - Sendgrid<br>7 - Brevo (formerly SendinBlue)<br>8 - SparkPost<br>9 - Other SMTP<br>Choose from 1, 2, 3, 4, 5, 6, 7, 8, 9 [1]: 1<br>use_async [n]: n<br>use_drf [n]: y<br>Select frontend_pipeline:<br>1 - None<br>2 - Django Compressor<br>3 - Gulp<br>4 - Webpack<br>Choose from 1, 2, 3, 4 [1]: 1<br>use_celery [n]: y<br>use_mailpit [n]: n<br>use_sentry [n]: y<br>use_whitenoise [n]: n<br>use_heroku [n]: y<br>Select ci_tool:<br>1 - None<br>2 - Travis<br>3 - Gitlab<br>4 - Github<br>Choose from 1, 2, 3, 4 [1]: 4<br>keep_local_envs_in_vcs [y]: y<br>debug [n]: n</pre><h4><strong><em>SQLite Database Caveat</em></strong></h4><p>The project generated by the cookiecutter-django template is based on the use of PostgreSQL for your database backend. Many of us would use a SQLite database for local development and then migrate the project to a PostgreSQL database when you are ready to deploy it to managed environments. If using SQLite you will hit error <strong><em>django.db.utils.OperationalError: no such table: django_site_id_seq</em></strong> when you first run the migration scripts. This is because PostgreSQL and SQLite handle auto-incrementing fields differently.</p><p>The workaround for the problem can be seen in an issue opened by <a href="https://github.com/amstilp">Dr. Adrienne Stilp</a> seen <a href="https://github.com/cookiecutter/cookiecutter-django/issues/3587">here</a> and in <a href="https://blog.tafkas.net/2024/04/17/using-cookiecutter-django-with-sqlite/">this blog entry</a> from <a href="https://medium.com/u/8c939537fb67">Christian Stade-Schuldt</a>. Unfortunately, the project maintainers have made the decision to only support PostgreSQL going forward. Hope this helps anyone that also uses SQLite for the local development sandbox.</p><h3>Time-Saving Benefits</h3><p>By automating the initial setup, cookiecutter-django saves you valuable time. Instead of spending hours configuring your project, you can focus on writing code and building features. This efficiency is especially beneficial for teams working on tight deadlines.</p><h3>Built-in Tools and Integrations</h3><p>cookiecutter-django comes with a variety of built-in tools and integrations that enhance your development workflow. Some of these include:</p><ul><li>Docker for containerization</li><li>Celery for asynchronous task processing</li><li>Django REST Framework for building APIs</li><li>Whitenoise for serving static files</li></ul><p>These tools are pre-configured and ready to use, reducing the effort required to integrate them into your project. A simplified list of features can be found on the project’s <a href="https://github.com/cookiecutter/cookiecutter-django?tab=readme-ov-file#features">README</a> page, but a better understanding of what .</p><h3>Community and Support</h3><p>cookiecutter-django has an active community of contributors and users. This means you can find plenty of resources, tutorials, and support to help you get the most out of the template. The community also contributes to the continuous improvement of the template, ensuring it stays up-to-date with the latest best practices.</p><h3>Conclusion</h3><p>In summary, cookiecutter-django is an essential tool for any Django developer. It simplifies project setup, enforces best practices, and includes a wealth of built-in features and integrations. By using cookiecutter-django, you can save time, ensure consistency, and focus on building great applications. Consider using cookiecutter-django for your next Django project to experience these benefits firsthand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d3c00cdce51" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>