<?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: Benjamin Kincses</title>
    <description>The latest articles on DEV Community by Benjamin Kincses (@benjaminkincses).</description>
    <link>https://dev.to/benjaminkincses</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%2F4147531%2F21104414-b4e3-4881-8027-64fc494eb013.png</url>
      <title>DEV Community: Benjamin Kincses</title>
      <link>https://dev.to/benjaminkincses</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/benjaminkincses"/>
    <language>en</language>
    <item>
      <title>broken access control in wp recipe maker 10.9.2, how i found it and how to test yours</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Mon, 23 Nov 2026 11:04:00 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/broken-access-control-in-wp-recipe-maker-1092-how-i-found-it-and-how-to-test-yours-241d</link>
      <guid>https://dev.to/benjaminkincses/broken-access-control-in-wp-recipe-maker-1092-how-i-found-it-and-how-to-test-yours-241d</guid>
      <description>&lt;p&gt;Patchstack advisory: &lt;a href="https://patchstack.com/database/wordpress/plugin/wp-recipe-maker/vulnerability/wordpress-wp-recipe-maker-plugin-10-9-2-broken-access-control-vulnerability" rel="noopener noreferrer"&gt;WordPress WP Recipe Maker Plugin &amp;lt;= 10.9.2 is vulnerable to Broken Access Control&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  what shipped
&lt;/h3&gt;

&lt;p&gt;patchstack published the advisory. reported 4 Nov 2026.&lt;br&gt;
plugin: wp recipe maker, version 10.9.2.&lt;br&gt;
bug: broken access control.&lt;br&gt;
fixed in: 10.9.3.&lt;br&gt;
credit: benjamin kincses.&lt;br&gt;
if you run the plugin, update. the rest is for builders.&lt;/p&gt;

&lt;h3&gt;
  
  
  the bug class, plain
&lt;/h3&gt;

&lt;p&gt;access control answers one question: is this user allowed to do this action.&lt;br&gt;
authentication answers a different one: is this user logged in.&lt;br&gt;
this bug mixed them up. being logged in was treated as being allowed. a low privilege account could call an action that belongs to admins.&lt;/p&gt;

&lt;h3&gt;
  
  
  test setup
&lt;/h3&gt;

&lt;p&gt;you need almost nothing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a local wordpress install with the plugin on the old version&lt;/li&gt;
&lt;li&gt;1 admin account&lt;/li&gt;
&lt;li&gt;1 subscriber account&lt;/li&gt;
&lt;li&gt;a proxy or just the browser dev tools to save the request
no special tooling. if you cannot reproduce it with this setup, you do not have a finding yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  reproduction, step by step
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;log in as admin.&lt;/li&gt;
&lt;li&gt;do the privileged action in the plugin. save the full request.&lt;/li&gt;
&lt;li&gt;log out. log in as subscriber.&lt;/li&gt;
&lt;li&gt;replay the same request as subscriber.&lt;/li&gt;
&lt;li&gt;check the result, not just the status code. did the action actually happen.
in the vulnerable version, it did. in 10.9.3, it does not. that before and after is the whole proof.
note: exact endpoints and parameters are in the patchstack advisory. i am not adding anything past the public advisory here.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  why nonce alone fails
&lt;/h3&gt;

&lt;p&gt;wordpress nonces stop csrf. they do not check roles.&lt;br&gt;
a subscriber can load pages that hand them valid nonces for things they should never do. if the handler checks the nonce and stops there, the door is open.&lt;br&gt;
order that works: capability check first. nonce second. then the action.&lt;/p&gt;

&lt;h3&gt;
  
  
  the fix pattern
&lt;/h3&gt;

&lt;p&gt;in php, before the action runs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;check current_user_can with the smallest capability that fits the action. manage_options for admin settings, not a loose edit_posts if the action is admin level.&lt;/li&gt;
&lt;li&gt;if the check fails, stop. return an error. do not run part of the action first.&lt;/li&gt;
&lt;li&gt;repeat for every entry point: ajax, rest, and form posts. fixing one route and missing the ajax twin is the usual miss.
then retest as subscriber. it must fail. retest as admin. it must still work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  audit your own plugin in 30 minutes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;list every ajax action and rest route your plugin registers.&lt;/li&gt;
&lt;li&gt;next to each, write the capability it should require.&lt;/li&gt;
&lt;li&gt;grep the handler. if there is no cap check in the handler or a permission callback, flag it.&lt;/li&gt;
&lt;li&gt;replay each one as subscriber.&lt;/li&gt;
&lt;li&gt;fix the ones that pass. retest.
30 minutes. this one pass finds this class faster than reading the whole codebase top to bottom.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  timeline and credit
&lt;/h3&gt;

&lt;p&gt;found in audit, reported through patchstack on 4 Nov 2026, fix in 10.9.3.&lt;br&gt;
i ask for two things on every report: fair compensation where a program offers it, and name credit where it gets published. patchstack credited benjamin kincses on this one.&lt;/p&gt;

&lt;h3&gt;
  
  
  closing
&lt;/h3&gt;

&lt;p&gt;boring bug. real impact. clean fix.&lt;br&gt;
i hunt wordpress plugins and open source. proof first, report second, writeup after the fix. more of these are coming.&lt;/p&gt;

&lt;p&gt;Patchstack advisory: &lt;a href="https://patchstack.com/database/wordpress/plugin/wp-recipe-maker/vulnerability/wordpress-wp-recipe-maker-plugin-10-9-2-broken-access-control-vulnerability" rel="noopener noreferrer"&gt;WordPress WP Recipe Maker Plugin &amp;lt;= 10.9.2 is vulnerable to Broken Access Control&lt;/a&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>security</category>
      <category>php</category>
      <category>bugbounty</category>
    </item>
    <item>
      <title>The security audit checklist I run on every project (277 checks)</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Fri, 20 Nov 2026 20:03:56 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/the-security-audit-checklist-i-run-on-every-project-277-checks-2d58</link>
      <guid>https://dev.to/benjaminkincses/the-security-audit-checklist-i-run-on-every-project-277-checks-2d58</guid>
      <description>&lt;p&gt;Most security audits fail for a simple reason. People rely on memory.&lt;/p&gt;

&lt;p&gt;They check what they remember. They skip what they forget. They find the obvious issues and miss the rest.&lt;/p&gt;

&lt;p&gt;A checklist fixes that. It turns an audit into a repeatable process. Same checks. Same order. No gaps.&lt;/p&gt;

&lt;p&gt;I built the Security Audit Checklist Pack for my own projects. It has 277 professional checks in 15 parts. I run it on every project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three checks from the pack, free
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. IDOR checks on object endpoints
&lt;/h3&gt;

&lt;p&gt;Request an object as one user. Then request the same object as another user. If the second user can read, edit, or delete it, you have a problem. Test every object endpoint, not just the main ones. Check list views, detail views, and direct IDs in URLs and API calls.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Password reset token expiry and single use
&lt;/h3&gt;

&lt;p&gt;Request a password reset. Use the token once, then try it again. It must fail the second time. Check the expiry time. A token that works forever, or works more than once, is a risk. Confirm the token is invalid after the password changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. File upload validation
&lt;/h3&gt;

&lt;p&gt;Upload a file with a changed extension. Upload a file with a double extension. Upload an executable disguised as an image. Check the file type on the server, not just in the browser. Check size limits, storage location, and how the file is served back. A file that should be rejected must be rejected.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the full pack covers
&lt;/h2&gt;

&lt;p&gt;Auth, access control, APIs, uploads, config, headers, and more. 277 checks in total, across 15 parts. Each check is clear and practical. Work through it in order. Mark each item pass or fail. Fix what fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who it is for
&lt;/h2&gt;

&lt;p&gt;Developers who ship web apps. Freelancers who audit client projects. Teams that want the same standard on every review. If you audit apps and want a complete, repeatable process, this is for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Price and link
&lt;/h2&gt;

&lt;p&gt;The Security Audit Checklist Pack is $39.&lt;/p&gt;

&lt;p&gt;Get it here: &lt;a href="https://cor8947.gumroad.com/l/fbbav" rel="noopener noreferrer"&gt;https://cor8947.gumroad.com/l/fbbav&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run the same checks on every project. Find the issues before someone else does.&lt;/p&gt;

</description>
      <category>security</category>
      <category>checklist</category>
      <category>webdev</category>
      <category>audit</category>
    </item>
    <item>
      <title>One persistent SSH tunnel made my remote PC control 5-10x faster</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Mon, 16 Nov 2026 10:44:52 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/one-persistent-ssh-tunnel-made-my-remote-pc-control-5-10x-faster-3jnm</link>
      <guid>https://dev.to/benjaminkincses/one-persistent-ssh-tunnel-made-my-remote-pc-control-5-10x-faster-3jnm</guid>
      <description>&lt;p&gt;I drive a Windows PC from a Linux VM over SSH. Every action used to open a fresh SSH tunnel, run one command, and tear it down. A single status check cost 5 to 7 seconds. A short sequence of actions cost a minute. The work was slow, not the PC.&lt;/p&gt;

&lt;p&gt;The fix was boring. One persistent tunnel, reused for everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;Before: each call opened its own tunnel (&lt;code&gt;ssh -N -L ...&lt;/code&gt;), waited a fixed 4 seconds for it to come up, ran one request, and closed it.&lt;/p&gt;

&lt;p&gt;After: one tunnel process, started on demand, kept alive with a restart loop. Readiness is a TCP poll on the local port, not a fixed sleep. The client keeps one process and runs many requests through it in script mode.&lt;/p&gt;

&lt;p&gt;Two more cuts came with it. The status response was a full UI automation dump, several kilobytes of noise. Now it returns interactive elements and text only. And the client batches: one process, many requests, instead of one process per request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measured, not guessed
&lt;/h2&gt;

&lt;p&gt;Ping through the tunnel: 0.41s. A state read: about 1.1s. The old client took about 5.3s for a ping and 5 to 7s per state call. Roughly 5 to 10x faster, depending on the call.&lt;/p&gt;

&lt;p&gt;A real sequence (type in Notepad, select all, read the text back) went from a median of 17.29s with the old per-action loop to 7.69s batched, and 7.06s with the chunked runner. The remaining time is paced typing and app waits, not transport.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that actually matters
&lt;/h2&gt;

&lt;p&gt;The tunnel is the expensive piece, not the work. SSH handshake plus TCP setup plus a fixed sleep dominated every call. Once the tunnel stays up, the calls themselves are cheap.&lt;/p&gt;

&lt;p&gt;If your remote automation feels slow, check what you pay per call before you optimize the calls. One persistent connection, readiness by poll instead of sleep, and the smallest response you can get away with. That was the whole change.&lt;/p&gt;

</description>
      <category>ssh</category>
      <category>automation</category>
      <category>windows</category>
      <category>wsl</category>
    </item>
    <item>
      <title>10 wordpress plugin vulns i reported are public</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Mon, 09 Nov 2026 20:14:57 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/10-wordpress-plugin-vulns-i-reported-are-public-13i8</link>
      <guid>https://dev.to/benjaminkincses/10-wordpress-plugin-vulns-i-reported-are-public-13i8</guid>
      <description>&lt;p&gt;wpscan published 10 vulnerabilities i found and reported, all in one plugin: security for woocommerce (ultimate security for woocommerce), versions &amp;lt;= 1.0.16. no fix is available.&lt;/p&gt;

&lt;p&gt;the 10, all unauthenticated, all credited to me on wpscan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CVE-2026-123696 - two-factor authentication reset - &lt;a href="https://wpscan.com/vulnerability/60efadce-ae1b-448c-9e9c-aa65ee5e028d" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/60efadce-ae1b-448c-9e9c-aa65ee5e028d&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123697 - two-factor code and secret disclosure - &lt;a href="https://wpscan.com/vulnerability/58f2562b-e108-46ab-92bb-3430109dab1f" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/58f2562b-e108-46ab-92bb-3430109dab1f&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123698 - plugin settings disclosure via REST API - &lt;a href="https://wpscan.com/vulnerability/f13ecbe7-8abb-4736-be5c-fd38f402181c" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/f13ecbe7-8abb-4736-be5c-fd38f402181c&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123699 - forced plugin, theme and core updates - &lt;a href="https://wpscan.com/vulnerability/344ca520-dc28-4d52-a400-559d23359d23" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/344ca520-dc28-4d52-a400-559d23359d23&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123700 - mass comment deletion - &lt;a href="https://wpscan.com/vulnerability/3facdee3-eb7e-458c-b496-9946f8e2d1f0" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/3facdee3-eb7e-458c-b496-9946f8e2d1f0&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123701 - plugin settings reset - &lt;a href="https://wpscan.com/vulnerability/9d65f64f-b9d5-488d-a81d-4013a1b1fc9e" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/9d65f64f-b9d5-488d-a81d-4013a1b1fc9e&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123702 - wp-config keys and salts reset and denial of service - &lt;a href="https://wpscan.com/vulnerability/28de2af4-74aa-497d-9f1a-69d40c72fea5" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/28de2af4-74aa-497d-9f1a-69d40c72fea5&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123703 - arbitrary user logout - &lt;a href="https://wpscan.com/vulnerability/6b255385-26ae-416c-8c2d-a673508aa212" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/6b255385-26ae-416c-8c2d-a673508aa212&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123704 - administrator email address disclosure - &lt;a href="https://wpscan.com/vulnerability/b7e8fa76-32c0-48ea-a685-2a75ffe94cd1" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/b7e8fa76-32c0-48ea-a685-2a75ffe94cd1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CVE-2026-123705 - server configuration information disclosure - &lt;a href="https://wpscan.com/vulnerability/cb9bbd7a-c13a-4129-a910-45746af203ce" rel="noopener noreferrer"&gt;https://wpscan.com/vulnerability/cb9bbd7a-c13a-4129-a910-45746af203ce&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;i audited the plugin, proved each finding, then reported them. no proof, no report.&lt;/p&gt;

&lt;p&gt;the same list is on my research page: &lt;a href="https://benihacking.top/research.html" rel="noopener noreferrer"&gt;https://benihacking.top/research.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;separate lane, same rule as the PR work: find it, prove it, report it. 50 merged PRs so far. going to 100.&lt;/p&gt;

</description>
      <category>security</category>
    </item>
    <item>
      <title>That .apkm file will not install from your file manager</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Sun, 08 Nov 2026 11:55:55 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/that-apkm-file-will-not-install-from-your-file-manager-3khi</link>
      <guid>https://dev.to/benjaminkincses/that-apkm-file-will-not-install-from-your-file-manager-3khi</guid>
      <description>&lt;p&gt;Downloaded a beta update today. Tapped the file in the file manager. Nothing happened. No error, no install screen. Nothing.&lt;/p&gt;

&lt;p&gt;The file was fine. The format was the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  An .apkm is not an APK
&lt;/h2&gt;

&lt;p&gt;It is a zip. Inside is not one app but a set of them: a &lt;code&gt;base.apk&lt;/code&gt;, plus config splits. One split per CPU architecture, one per screen density, one per language, and sometimes a pile of feature modules on top.&lt;/p&gt;

&lt;p&gt;The stock Android installer opens a single APK. It does not open bundles. Third-party installer apps exist for this format, but you do not need one. You need adb and two minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Look inside first
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;unzip &lt;span class="nt"&gt;-l&lt;/span&gt; app.apkm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real numbers from the two bundles I installed today: one was 201 MB with over 30 splits inside. The other was 340 MB with 126 files, 85 of them feature splits. My phone needed 4 files out of the first bundle and 72 out of the second. Everything else in there is for other phones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the signature before you install anything
&lt;/h2&gt;

&lt;p&gt;A split bundle from a mirror is still a sideload. Two checks, both cheap.&lt;/p&gt;

&lt;p&gt;First, the version. If the bundle's versionCode is lower than the installed app's, Android refuses the downgrade and the install dies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;adb shell dumpsys package com.google.android.youtube | &lt;span class="nb"&gt;grep &lt;/span&gt;versionCode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, the signing certificate. An update only installs over the existing app if the same key signed it. If the cert differs, one of two things is true: the file is a modded build, or it is not the app you think it is. Either way, you want to know before, not after.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apksigner verify &lt;span class="nt"&gt;--print-certs&lt;/span&gt; base.apk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pull the installed app's base.apk and compare the SHA-256 fingerprint. Today both bundles matched the installed apps exactly. Official builds, just shipped as bundles. That is the normal case for beta mirrors, but check anyway. It costs ten seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install only the splits your phone needs
&lt;/h2&gt;

&lt;p&gt;Pick by three things: architecture (arm64-v8a on most current phones), density (mine is 320 dpi, so xhdpi), language (en).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;adb install-multiple &lt;span class="nt"&gt;-r&lt;/span&gt; base.apk split_config.arm64_v8a.apk split_config.xhdpi.apk split_config.en.apk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the bundle has feature splits, install the ones for your architecture and language too. If a required split is missing, the installer fails and names it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify like you mean it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;adb shell dumpsys package com.google.android.youtube | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"versionName|versionCode"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open the app. New version in dumpsys plus the app actually running is proof. "Install said Success" on its own is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.apkm&lt;/code&gt;, &lt;code&gt;.apks&lt;/code&gt;, &lt;code&gt;.xapk&lt;/code&gt;: bundles, not apps. The file manager tap failing is expected behavior, not a broken file.&lt;/li&gt;
&lt;li&gt;The bundle is a zip. Look inside before you install anything from it.&lt;/li&gt;
&lt;li&gt;Match the signing cert to the installed app. Mismatch means stop.&lt;/li&gt;
&lt;li&gt;Install base plus your architecture, density, and language splits with &lt;code&gt;install-multiple&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Verify the version after, and launch the app.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>security</category>
      <category>tutorial</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Blind RSA in circl ignored the reader you passed it</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Thu, 05 Nov 2026 10:46:30 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/blind-rsa-in-circl-ignored-the-reader-you-passed-it-1645</link>
      <guid>https://dev.to/benjaminkincses/blind-rsa-in-circl-ignored-the-reader-you-passed-it-1645</guid>
      <description>&lt;p&gt;Cloudflare's circl has a partially blind RSA signer. Its Blind method takes an io.Reader. The blinding factor used that reader. The salt did not. It read from crypto/rand directly.&lt;/p&gt;

&lt;p&gt;That breaks the contract. Two calls with the same deterministic reader should give the same blinded message. They did not, because half the randomness came from somewhere else. The sibling code in brsa.go did it right and used the supplied reader throughout.&lt;/p&gt;

&lt;p&gt;The fix is one line in blindsign/blindrsa/partiallyblindrsa/pbrsa.go:&lt;/p&gt;

&lt;p&gt;_, err := io.ReadFull(random, salt)&lt;/p&gt;

&lt;p&gt;It used to read from rand.Reader. Now it reads from random, the reader the caller passed in.&lt;/p&gt;

&lt;p&gt;The test pins it down. TestBlindUsesSuppliedReader calls Blind twice with fresh deterministic readers that emit the same byte sequence. Both blinded messages must be identical. It fails before the fix and passes after. Callers passing crypto/rand see no behavior change.&lt;/p&gt;

&lt;p&gt;Merged as cloudflare/circl#711: &lt;a href="https://github.com/cloudflare/circl/pull/711" rel="noopener noreferrer"&gt;https://github.com/cloudflare/circl/pull/711&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>cryptography</category>
      <category>opensource</category>
    </item>
    <item>
      <title>mypy rejected subclassing an inferred-Any variable. The fix is deferred, not special-cased.</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Thu, 29 Oct 2026 10:45:27 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/mypy-rejected-subclassing-an-inferred-any-variable-the-fix-is-deferred-not-special-cased-kin</link>
      <guid>https://dev.to/benjaminkincses/mypy-rejected-subclassing-an-inferred-any-variable-the-fix-is-deferred-not-special-cased-kin</guid>
      <description>&lt;p&gt;mypy accepted this:&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;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Sub&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It rejected this:&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;def&lt;/span&gt; &lt;span class="nf"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nb"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Any&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;Any&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;args&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="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Sub&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same variable, same Any. The difference is when the type is known. Semantic analysis runs before type inference. When a base class is a variable with no inferred type yet, the analyser saw Var.type is None and reported it invalid, early, before inference ever got a say.&lt;br&gt;
The fix does not special-case Any. It defers the verdict. A new DeferredBaseClassVar exception fires when a base-class variable has no inferred type yet, on the base-class analysis path only. analyze_base_classes catches it, treats the base as Any provisionally so MRO computation proceeds, and records it for the checker to settle once inference is done. The premature --disallow-subclassing-any error is skipped for provisional bases for the same reason: you cannot grade a type that does not exist yet.&lt;br&gt;
The general point is the one that keeps showing up in type checkers: an error raised in the wrong phase is a false positive, even when the check itself is correct. Fix the phase, not the check.&lt;br&gt;
Since the first version, the deferred-base handling gained support for a second subscript and for string subscripts, pushed 2026-10-29. The PR is still open, not merged.&lt;br&gt;
PR: python/mypy#22037. Fixes #21998.&lt;/p&gt;

</description>
      <category>python</category>
      <category>mypy</category>
      <category>typechecking</category>
    </item>
    <item>
      <title>lazycommit: the commit message is clerical work</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Fri, 23 Oct 2026 22:15:08 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/lazycommit-the-commit-message-is-clerical-work-3ih2</link>
      <guid>https://dev.to/benjaminkincses/lazycommit-the-commit-message-is-clerical-work-3ih2</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;The change is done. Tests pass. Then I run &lt;code&gt;git commit&lt;/code&gt; and sit there,&lt;br&gt;
staring at a blinking cursor, trying to compress an hour of work into&lt;br&gt;
seven words.&lt;/p&gt;

&lt;p&gt;I have typed "fix stuff" more times than I will admit. Also "wip",&lt;br&gt;
"changes", and once, memorably, "please work". Every one of those&lt;br&gt;
commits was good code with a message written by a person who had&lt;br&gt;
already spent his attention on the code.&lt;/p&gt;

&lt;p&gt;So for Slow and Steady I built the tool I kept wishing for. It does not&lt;br&gt;
write code. It does the clerical work after the code, which is exactly&lt;br&gt;
the work laziness should take.&lt;/p&gt;
&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;lazycommit&lt;/strong&gt; is a small CLI, one Python file, standard library only.&lt;/p&gt;

&lt;p&gt;Stage your changes, run it, and it prints three commit messages in&lt;br&gt;
Conventional Commits format. You press &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt; or &lt;code&gt;3&lt;/code&gt;, and it commits&lt;br&gt;
with the one you picked. Press &lt;code&gt;q&lt;/code&gt; and it walks away and commits&lt;br&gt;
nothing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add stats.py
lazycommit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No dependencies to install, no config file, no API key. The whole thing&lt;br&gt;
is small enough to read in one sitting, which I count as a feature.&lt;/p&gt;
&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Three steps, and the interesting part is what each one refuses to do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Read the staged diff, and only the staged diff.&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;git diff --cached&lt;/code&gt;. Unstaged work never leaves the machine, because it&lt;br&gt;
was never part of this commit. If nothing is staged, the tool says so&lt;br&gt;
and exits. It does not guess.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Send a capped diff to a free text endpoint.&lt;/strong&gt;&lt;br&gt;
The diff is truncated at 6,000 characters before it goes anywhere. The&lt;br&gt;
head of a diff carries the file names and the first hunks, which is&lt;br&gt;
enough context for a subject line, and the cap keeps the request small.&lt;br&gt;
The default endpoint is the Pollinations text API: free, no key,&lt;br&gt;
a &lt;code&gt;messages&lt;/code&gt; array in and text out. The model and endpoint are flags&lt;br&gt;
(&lt;code&gt;--model&lt;/code&gt;, &lt;code&gt;--endpoint&lt;/code&gt;), so swapping providers is a one-line change.&lt;/p&gt;

&lt;p&gt;The prompt is strict. Exactly three lines. Conventional Commits format.&lt;br&gt;
Imperative mood, under 72 characters each. Three different angles on the&lt;br&gt;
same change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Parse like you do not trust the model. Because I do not.&lt;/strong&gt;&lt;br&gt;
Models like to help. They add "Here are three options for you!" and&lt;br&gt;
numbering and backticks. The parser strips all of that, prefers lines&lt;br&gt;
that actually match the &lt;code&gt;type(scope): summary&lt;/code&gt; pattern, drops&lt;br&gt;
duplicates, and takes the first three. If nothing usable comes back,&lt;br&gt;
you get a one-line error. Not a traceback, and not a garbage commit.&lt;/p&gt;

&lt;p&gt;That defensive parser is most of the code, and most of the tests.&lt;br&gt;
23 tests, all offline, API and git mocked.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;A real run, live free API, throwaway repo. The staged change adds an&lt;br&gt;
empty-list guard to an &lt;code&gt;average()&lt;/code&gt; helper:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git add stats.py
$ lazycommit
  1. feat(stats): handle empty list in average
  2. fix(stats): return 0 for empty numbers
  3. perf(stats): guard against division by zero
pick 1-3 (or q to quit): 1
[master bab7bea] feat(stats): handle empty list in average
 1 file changed, 2 insertions(+)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice what happened there. Three messages, one change, and they still&lt;br&gt;
disagree about whether it was a &lt;code&gt;feat&lt;/code&gt;, a &lt;code&gt;fix&lt;/code&gt; or a &lt;code&gt;perf&lt;/code&gt;. Anyone who&lt;br&gt;
has argued about commit types in a review thread knows that argument.&lt;br&gt;
The tool does not settle it. It just makes sure I am choosing between&lt;br&gt;
three decent options instead of inventing a fourth bad one from&lt;br&gt;
nothing.&lt;/p&gt;

&lt;p&gt;Total time, about ten seconds, most of it network.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;The API call was the easy part. Fifteen lines, including the error&lt;br&gt;
handling. Everything else was deciding where the laziness stops.&lt;/p&gt;

&lt;p&gt;One generated message would have been faster to build. It also would&lt;br&gt;
have been a command: take it or leave it. Three messages is a menu.&lt;br&gt;
Reading three short lines and pressing one key is genuinely lazy, and&lt;br&gt;
the choice stays mine. That difference is the whole design.&lt;/p&gt;

&lt;p&gt;The other thing: a tool that commits on your behalf has to be boring&lt;br&gt;
about safety. Stage nothing, get nothing. Model rambles, commit&lt;br&gt;
nothing. Network dies, one clean line of error and commit nothing.&lt;br&gt;
Every failure path in lazycommit ends the same way, with your repo&lt;br&gt;
exactly as you left it.&lt;/p&gt;

&lt;p&gt;Slow and steady, it turns out, is a decent spec for a lazy tool.&lt;br&gt;
Small, a little stubborn, and it saves its effort for the part you&lt;br&gt;
actually want to skip.&lt;/p&gt;

&lt;p&gt;The code is on GitHub: &lt;a href="https://github.com/Dextheking1/lazycommit" rel="noopener noreferrer"&gt;https://github.com/Dextheking1/lazycommit&lt;/a&gt;. MIT licensed.&lt;br&gt;
Take it, break it, and go back to not writing commit messages.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is part of the DEV x MLH Hacktoberfest "Slow and Steady"&lt;br&gt;
challenge.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>python</category>
      <category>git</category>
    </item>
    <item>
      <title>3 prompt patterns that actually work, with copy-paste examples</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Mon, 28 Sep 2026 23:18:46 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/3-prompt-patterns-that-actually-work-with-copy-paste-examples-10e2</link>
      <guid>https://dev.to/benjaminkincses/3-prompt-patterns-that-actually-work-with-copy-paste-examples-10e2</guid>
      <description>&lt;p&gt;Most bad AI output is a bad prompt, not a bad model. These three patterns fix the majority of it. Each one includes a template you can copy.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Role plus constraints
&lt;/h2&gt;

&lt;p&gt;Vague prompts get vague answers. Give the model a role and hard constraints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a senior Python reviewer. Review the code below.
Rules:
- List only real bugs, not style nits
- Max 5 items
- Each item: one line describing the bug, one line with the fix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The constraints do the heavy lifting. "Max 5 items" and "one line each" force density. Without them you get a polite essay.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Few-shot examples
&lt;/h2&gt;

&lt;p&gt;Show the model what good output looks like instead of describing it. Two examples beat two paragraphs of instructions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Convert these into calendar event titles:

Input: "Lunch with Sara tomorrow at noon"
Output: "Lunch - Sara"

Input: "Dentist appointment Friday 3pm"
Output: "Dentist"

Input: "Call the bank about the fee on Monday morning"
Output:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model continues the pattern. This works for formatting, classification, tone matching, and extraction. Use it whenever the output has a shape you can demonstrate.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Ask for questions first
&lt;/h2&gt;

&lt;p&gt;For anything complex, make the model interrogate you before it answers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I want to automate my invoice reminders. Before you suggest anything,
ask me every question you need answered to give a good recommendation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This kills the biggest failure mode: the model guessing your context and confidently solving the wrong problem. Answer its questions, then let it work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it together
&lt;/h2&gt;

&lt;p&gt;A strong prompt usually combines all three: a role with constraints, one or two examples of the output shape, and a questions-first step for anything ambiguous. Try rewriting your most-used prompt with this structure and compare the outputs.&lt;/p&gt;

&lt;p&gt;I build AI automations for businesses. Chatbots, workflow automation, custom tools that cut manual work. Engineering proof: github.com/Dextheking1. DMs open on X: @FREEAIMETHODS.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>promptengineering</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Automate a boring task for $0 with the Google AI Studio free API tier</title>
      <dc:creator>Benjamin Kincses</dc:creator>
      <pubDate>Mon, 28 Sep 2026 16:29:04 +0000</pubDate>
      <link>https://dev.to/benjaminkincses/automate-a-boring-task-for-0-with-the-google-ai-studio-free-api-tier-27i7</link>
      <guid>https://dev.to/benjaminkincses/automate-a-boring-task-for-0-with-the-google-ai-studio-free-api-tier-27i7</guid>
      <description>&lt;h1&gt;
  
  
  Automate a boring task for $0 with the Google AI Studio free API tier
&lt;/h1&gt;

&lt;p&gt;Google AI Studio gives you a free Gemini API key with a generous free tier. No credit card. Here is the full path from zero to a working automation.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Get your free API key
&lt;/h2&gt;

&lt;p&gt;Go to aistudio.google.com, sign in with a Google account, and click "Get API key". Copy it. Treat it like a password: put it in an environment variable, never in your code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-key-here"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Make your first call
&lt;/h2&gt;

&lt;p&gt;No SDK needed. Plain curl works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:generateContent"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"x-goog-api-key: &lt;/span&gt;&lt;span class="nv"&gt;$GEMINI_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"contents":[{"parts":[{"text":"Summarize this in one sentence: The quick brown fox jumps over the lazy dog."}]}]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;gemini-2.5-flash-lite&lt;/code&gt; is the fastest model and has the most generous free-tier quota, so it is the right default for automations.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Build something real: a text summarizer
&lt;/h2&gt;

&lt;p&gt;Say you wake up to 40 unread newsletters and threads. This script condenses pasted text into 5 bullets:&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;os&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;

&lt;span class="n"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;MODEL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-2.5-flash-lite&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://generativelanguage.googleapis.com/v1beta/models/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;MODEL&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;:generateContent&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;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;contents&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;parts&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;text&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;Summarize the following in exactly 5 short bullets:&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&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="n"&gt;req&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&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="n"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&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;Content-Type&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;application/json&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;x-goog-api-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;urlopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&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;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&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;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;candidates&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&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;parts&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&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="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&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="nf"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;long-article.txt | python summarize.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero dependencies beyond the standard library. Run it on a schedule with cron and you have a free daily digest.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Know the limits
&lt;/h2&gt;

&lt;p&gt;The free tier has rate limits (requests per minute and per day). They change, so check your current quota at aistudio.google.com under usage. If you hit a 429, slow down and retry later.&lt;/p&gt;

&lt;p&gt;One real caveat: do not send private or customer data through the free tier. Keep it to public or personal content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this goes
&lt;/h2&gt;

&lt;p&gt;Once you see what one script can do, the next step is wiring it into a real workflow: inbox triage, lead follow-ups, report generation. That is the part I do for businesses.&lt;/p&gt;

&lt;p&gt;I build AI automations for businesses. Chatbots, workflow automation, custom tools that cut manual work. Engineering proof: github.com/Dextheking1. DMs open on X: @FREEAIMETHODS.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>tutorial</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
