Week Notes 2026.12
Completions for Task #
When I started looking at task last week I hadn’t got
round to configuring shell completions. This turned out to be very straightforward,
I just had to create the file ~/.bashrc.d/task.sh containing:
if which task >& /dev/null; then
eval "$(task --completion bash)"
fi
Task also supports completions for zsh and fish: see the
docs for details.
Vulnerability Tracking #
Last week I wrote about collecting audit data from CI/CD pipelines and this week I started working on the code to sync that data periodically to Vanta. This turned out to be a bit of a pain, and not just because I’m working in Python.
Every audit tool outputs data in a different schema and every vulnerability database stores data in a different schema—even within the same database the fields available in a record might depend on the source of the vulnerability report. This makes it quite tedious to coerce the information into the Vanta schema (which is different again and has many required fields).
I found the JMESPath library for Python to be incredibly useful for navigating these various JSON data.
For example, to search a list of vulnerability aliases for the CVE id:
cve_id = jmespath.search("aliases[?starts_with(@, 'CVE-')]|[0]", v)
This could have been implemented quite easily directly in Python, but the JMESPath expression is more succinct. Where it really comes into its own, though, is in navigating deeply nested data structures. For example, to retrieve the CVSS score from an entry from the CVE database:
cvss3_score = jmespath.search(
"containers.cna.metrics[].cvssV3_1.baseScore|[0]", cve
)
To do this in Python would have required several nested loops and great care to avoid key or type errors when indexing arrays and dictionaries. See the JMESPath Specification for details and more examples.
The good news is that I now have something that works for all the audit tools we are using (although I fear this will need some TLC as the data shifts beneath us over time).
The bad news is that I already ran into a rate limit with the GitHub Advisory Database (used by npm) as this only allows 60 requests per hour. I know people joke about NodeJS projects having lots of dependencies, but look at the metadata for the project I’m testing with:
{
"vulnerabilities": {
"info": 0,
"low": 7,
"moderate": 7,
"high": 5,
"critical": 8,
"total": 27
},
"dependencies": {
"prod": 400,
"dev": 380,
"optional": 96,
"peer": 0,
"peerOptional": 0,
"total": 779
}
}
This project has 779 dependencies and 27 vulnerabilities! Given the GitHub rate limit, I could only run the aggregator twice an hour and it will only get worse when collating data from more projects. I already implemented in-memory caching so we only fetch the vulnerability data once even if it affects multiple projects, but if there are more than 60 distinct vulnerabilities across all our NodeJS projects we’ll hit this rate limit.
I need to decide whether to implement a persistent cache for this data, use a different vulnerability database (the OSV database also tracks npm vulnerabilities), or keep my fingers crossed and hope for the best.
Addendum #
I implemented some rudimentary caching of remote data in an S3 bucket:
def fetch_via_cache(url):
key = "cache/" + urlsafe_b64encode(url.encode("utf-8")).decode("utf-8").rstrip("=")
try:
obj = s3.Object(bucket_name, key).get()
return json.load(obj["Body"])
except s3.meta.client.exceptions.NoSuchKey:
pass
res = requests.get(url)
res.raise_for_status()
data = res.json()
s3.Object(bucket_name, key).put(
Body=json.dumps(data).encode("utf-8"),
ContentType="application/json",
ContentEncoding="utf-8",
)
return data
The code will be running in a Lambda function with max concurrency of one, and it’s single-threaded, so there’s no locking or protection against dog-piling here as I don’t think it’s needed. For the task at hand I’m not too worried about stale data either, so I’ll probably just configure a lifecycle rule on the S3 bucket to delete cache entries after three months.
Pretend Intelligence #
I recently started following Richard Stallman on Mastodon and was struck by his use of the term “Pretend Intelligence” when talking about generative algorithms. He spoke about this in a talk at Georgia Tech earlier this year (summary from Slashdot):
Speaking about AI, Stallman warned that “nowadays, people often use the term artificial intelligence for things that aren’t intelligent at all…” He makes a point of calling large language models “generators” because “They generate text and they don’t understand really what that text means.” (And they also make mistakes “without batting a virtual eyelash. So you can’t trust anything that they generate.”) Stallman says “Every time you call them AI, you are endorsing the claim that they are intelligent and they’re not. So let’s let’s refuse to do that.”
“So I’ve come up with the term Pretend Intelligence. We could call it PI. And if we start saying this more often, we might help overcome this marketing hype campaign that wants people to trust those systems, and trust their lives and all their activities to the control of those systems and the big companies that develop and control them.”
It turns out he’s been thinking along these lines for a while; in response to a question at another talk back in 2024 he said (from Techrights):
Well, the real AI systems that I’ve heard about operate in very narrow domains. A program that can look at an image of some cells and report whether it’s cancerous at least as accurately as a human pathologist, that can be very useful. But it’s in now way comparable to the mental breadth of a human mind. And no one would ever think it was. I suspect that the person who wrote this question was thinking of bullshit generators. And there, well there are a lot of things I can say to them. I saw a wonderful lecture by professor Zittrain of Harvard showing just how little bullshit generators actually understand of what they output and I think it got the message across very clearly. But I don’t know whether he’s published that. But I think that the first step is stop calling them AI. That’s why I put so much emphasis on what we should call them. After all, what we call them doesn’t change what they are. If you call it a bullshit generator or you call it AI it will still be the same system, whichever one it happens to be it’ll still be the same. Whichever system you’re talking about, it’ll still be the same whether you call it AI or a bullshit generator but what people expect from it will be different.
The practice of calling these things intelligence and repeating this many times a day to people leads most people unthinkingly to assume that that’s true. That’s why it makes a difference which one we call them. That’s why it’s not enough to say yeah they call them AI but it’s not true and then go on calling them AI. If we want to change the direction of the public of what to think, we have to be heard on this whenever people talk with us about this things and call it AI. We’ve got to be there and say, that’s a misnomer they are not anything like what we think.
I think Stallman is 100% right about this: there is no intelligence behind LLMs and other generative algorithms and every time we call them “AI” we are doing the marketers’ jobs for them. I like his use of “pretend” as it makes it clear it’s not real and emphasises that it’s being sold as something it’s not. If you hear me talking about Pretend Intelligence, now you know why.
Listening #
- Daughters of the Empire by Raymond E Feist and Janny Wurts (Audio book)
- Cautionary Tales: Explosives or Sugar? (Podcast)
- Late Night Linux: Episode 377 (Podcast)
- Linux Lads: Learning About Learning (Podcast)
- Linux Matters: Tailor Snaps for Big Iron (Podcast)
- Hybrid Cloud Show: Episode 52 (Podcast)
- 2.5 Admins: UPS for LiFePO4 (Podcast)