Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/site-refresh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Rebuild tetrak.dev on a schedule, so the security watch at /security/
# picks up sillybos's advisory record without a commit here.
#
# The site is built and published by Cloudflare Pages on every push to main.
# The watch is fetched from sillybos at build time, so a change to the
# record only reaches the site when something triggers a build. sillybos's
# advisory job runs on Mondays at 07:00 UTC; this runs two hours later and
# asks Cloudflare to build again, through a deploy hook.
#
# One secret: CLOUDFLARE_DEPLOY_HOOK, the hook's URL from the Pages
# project's settings (Builds & deployments → Deploy hooks). The URL is the
# credential, which is why it is a secret and never printed. Until it is
# set, the job says so and does nothing, so the workflow can land before
# the hook exists.
name: Refresh the site

on:
schedule:
- cron: "0 9 * * 1" # Mondays 09:00 UTC, after sillybos's advisory run
workflow_dispatch:

permissions: {}

jobs:
refresh:
name: Ask Cloudflare to rebuild
runs-on: ubuntu-latest
steps:
- name: Trigger the deploy hook
env:
HOOK: ${{ secrets.CLOUDFLARE_DEPLOY_HOOK }}
run: |
if [ -z "$HOOK" ]; then
echo "::notice::CLOUDFLARE_DEPLOY_HOOK is not set; nothing to trigger"
exit 0
fi
curl --fail --silent --show-error --request POST "$HOOK" --output /dev/null
echo "Rebuild requested."
93 changes: 93 additions & 0 deletions site/assets/scss/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -781,3 +781,96 @@
}
}
}

// The security watch: the advisory table, the verdict label and the facts
// list on an advisory page. Same bargain as the article apparatus: mono
// labels, hairlines and air, no boxes and no second accent. A verdict is
// a mono label like a kicker; the modifiers change nothing but weight, so
// that "refused by default" and "needs decoding to detect" read as the same
// kind of thing and the sentence beside them does the work.
.watch {
&__date {
font-family: var(--font-mono);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}

&__key {
display: block;
font-family: var(--font-mono);
font-size: 0.75rem;
color: var(--ink-soft);
}

&__counts {
font-family: var(--font-mono);
font-size: 0.75rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--ink-soft);
}

&__libraries {
display: grid;
gap: 0.4rem 1.5rem;
margin: 0 0 2.4rem;

dt {
font-family: var(--font-display);
margin-top: 0.6rem;
}

dd {
margin: 0;
max-width: var(--measure);
}
}

&__package {
font-family: var(--font-mono);
font-size: 0.75rem;
color: var(--ink-soft);
margin-left: 0.6em;
}
}

.verdict {
font-family: var(--font-mono);
font-size: 0.75rem;
letter-spacing: 0.06em;
text-transform: uppercase;
white-space: nowrap;
color: var(--ink-soft);

&--default {
color: var(--clay-deep);
}
}

.advisory {
&__facts {
display: grid;
grid-template-columns: max-content 1fr;
gap: 0.35rem 1.5rem;
margin: 0 0 2.4rem;
border-top: 2px solid var(--clay);
padding-top: 1rem;

dt {
font-family: var(--font-mono);
font-size: 0.75rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--ink-soft);
padding-top: 0.2rem;
}

dd {
margin: 0;
}
}

&__tests code {
font-size: 0.8rem;
}
}
28 changes: 28 additions & 0 deletions site/config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ capitalizeListTitles = false
[build]
writeStats = true

# The one place the build fetches from at build time: the advisory record
# behind /security/ (params.advisoriesURL). An allow-list rather than Hugo's
# permissive default, so that a template cannot quietly start reading from
# somewhere else. Override with HUGO_SECURITY_HTTP_URLS to build against a
# local copy.
[security]
[security.http]
urls = ['^https://raw\.githubusercontent\.com/scattercode/sillybos/']

# The advisory record is the one remote resource the build reads, and the
# point of reading it at build time is to publish the current one. Hugo's
# default keeps a fetched resource for ever (maxAge -1), so a machine that
# had built the site once would keep showing the record as it was that
# day: a weekly rebuild would fetch nothing new. No caching, so every
# build reads the record as it is.
[caches]
[caches.getresource]
maxAge = 0

[outputs]
# index.json is the search index: built once at build time and filtered in
# the browser, rather than a search service. Build time over runtime.
Expand Down Expand Up @@ -78,6 +97,15 @@ capitalizeListTitles = false
# describes several tools, each in its own repository under it.
org = "https://github.com/scattercode"

# The security watch at /security/ is built from sillybos's advisory record
# (docs/advisories/record.json in that repository): one page per advisory
# and one per library, created at build time by content/security/
# _content.gotmpl from this file. Fetched rather than copied, so the site
# cannot drift from the record; the weekly refresh workflow rebuilds the
# site after sillybos's Monday advisory run. Override with
# HUGO_PARAMS_ADVISORIESURL to build against a branch.
advisoriesURL = "https://raw.githubusercontent.com/scattercode/sillybos/main/docs/advisories/record.json"

# Plausible: privacy-friendly, no cookies, no consent banner needed.
#
# First-party path served by the Cloudflare Pages Function at
Expand Down
14 changes: 14 additions & 0 deletions site/config/_default/menus/menu.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
pageRef = "/translit"
weight = 3

[[main]]
name = "sillybos"
parent = "products"
pageRef = "/sillybos"
weight = 4

# Beside Products rather than at the end: the split between the free tools
# and the paid work is the first thing a visitor should be able to see.
[[main]]
Expand All @@ -56,6 +62,14 @@
# Added August 2026 with the articles section. It sits next to Research
# because it is the same kind of thing: writing about the problem and about
# the tools' progress, alongside the fixed evidence.
# Added November 2026 with the security watch. A reference page rather than
# writing: the advisories on the image and PDF libraries everyone decodes
# with, what each one takes to trigger, and how to protect yourself.
[[main]]
name = "Security"
pageRef = "/security"
weight = 35

[[main]]
name = "Articles"
pageRef = "/articles"
Expand Down
12 changes: 10 additions & 2 deletions site/content/products.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Products"
kicker: "Open source"
standfirst: "Three tools, free and open source. Each works on its own, on your own machine, without us."
description: "Tetrak's open-source tools: Tetrak OCR for turning scans into searchable text, the Armenian text recogniser, and tetrak-translit for transliteration and cross-script search."
standfirst: "Four tools, free and open source. Each works on its own, on your own machine, without us."
description: "Tetrak's open-source tools: Tetrak OCR for turning scans into searchable text, the Armenian text recogniser, tetrak-translit for transliteration and cross-script search, and sillybos for checking a file before any decoder opens it."
---

Everything here is published under an open licence, with the code, the
Expand Down Expand Up @@ -33,4 +33,12 @@ what [our services]({{< relref "/services.md" >}}) are for.
standard, and folds every spelling of a name to one form for searching.
Armenian, Georgian, Russian and Syriac so far.

- **[sillybos]({{< relref "/sillybos.md" >}})**

Decides, before any image library or PDF renderer opens a file, whether
it is one of the formats you meant to read and within the limits you
expect, and says why not in a sentence. No dependencies. The
[security watch]({{< relref "/security/_index.md" >}}) records which
published flaws it refuses.

</div>
92 changes: 92 additions & 0 deletions site/content/security/_content.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{{- /*
Content adapter for the security watch.

Fetches sillybos's advisory record (site.Params.advisories_url, the
record.json that scripts/advisory_record.py in that repository generates)
and creates one page per advisory at /security/<key>/ and one per library
at /security/<library>/. The pages carry the record's fields as params;
layouts/security/single.html renders them and layouts/security/list.html
lists them. Nothing is copied into this repository, so the site cannot
drift from the record.

A fetch failure fails the build rather than publishing a watch with no
rows in it: a page that silently went empty is worse than a build that
says why.
*/ -}}
{{- $url := site.Params.advisoriesURL }}
{{- if not $url }}{{ errorf "security: site.Params.advisoriesURL is not set" }}{{ end }}
{{- $opts := dict "headers" (dict "Accept" "application/json") }}
{{- $attempt := try (resources.GetRemote $url $opts) }}
{{- if $attempt.Err }}
{{- errorf "security: could not fetch the advisory record from %s: %s" $url $attempt.Err }}
{{- else if not $attempt.Value }}
{{- errorf "security: nothing came back from %s" $url }}
{{- else }}
{{- with $attempt.Value.Content }}
{{- $record := . | transform.Unmarshal }}
{{- $generated := $record.generated }}
{{- $libraries := hugo.Data.watch.library }}

{{- /* One page per advisory. The path is the key, lowercased, so a
reader who searches a CVE id lands on /security/cve-2026-112900/.
The date is when the advisory was published, or when it was
triaged if upstream gave no date, so the feed and the ordering
have something to go on. It goes in the `dates` map: a top-level
`date` key is not one the adapter reads, and Hugo ignores it
without a word, leaving every page at year 1. */ -}}
{{- /* $seen maps each library's slug to the date of its newest advisory,
which becomes the library page's own date, so the feed and the
sitemap can say when it last gained a row. */ -}}
{{- $seen := dict }}
{{- range $record.records }}
{{- $key := .key }}
{{- $slug := lower $key }}
{{- $date := .published | default .triaged }}
{{- $libslug := lower .library }}
{{- $newest := index $seen $libslug | default "" }}
{{- if gt $date $newest }}{{ $newest = $date }}{{ end }}
{{- $seen = merge $seen (dict $libslug $newest) }}
{{- $page := dict
"path" $slug
"kind" "page"
"title" .title
"dates" (dict "date" (time.AsTime $date))
"description" .summary
"params" (dict
"kind" "advisory"
"advisory" .
"library_slug" $libslug
"generated" $generated
"kicker" (printf "Security · %s" .library)
"standfirst" .summary)
"content" (dict "mediaType" "text/markdown" "value" .summary)
}}
{{- $.AddPage $page }}
{{- end }}

{{- /* One page per library that has at least one record. The watchlist
in data/watch.toml names the rest; the index lists them. */ -}}
{{- range $slug, $newest := $seen }}
{{- $lib := index $libraries $slug }}
{{- if not $lib }}
{{- errorf "security: the record names a library, %q, that data/watch.toml does not describe" $slug }}
{{- end }}
{{- $page := dict
"path" $slug
"kind" "page"
"title" (printf "%s advisories" $lib.name)
"dates" (dict "date" (time.AsTime $newest))
"description" (printf "Published security flaws in %s, what each one takes to trigger, and whether a check before decoding refuses the file." $lib.name)
"params" (dict
"kind" "library"
"library" $lib
"library_slug" $slug
"generated" $generated
"kicker" "Security"
"standfirst" $lib.what)
"content" (dict "mediaType" "text/markdown" "value" $lib.what)
}}
{{- $.AddPage $page }}
{{- end }}
{{- end }}
{{- end }}
34 changes: 34 additions & 0 deletions site/content/security/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "Imaging security watch"
kicker: "Security"
standfirst: "The published security flaws in the libraries that decode images and PDFs, what each one takes to trigger, and how to protect a pipeline that opens files it did not make. Kept current from sillybos's advisory record, rebuilt weekly."
description: "A current record of security vulnerabilities (CVEs) in image and PDF libraries: Pillow, libtiff, libpng, libjpeg-turbo, poppler and others. For each: what triggers it, whether it is reached by opening a file, which are refused before decoding, and how to protect yourself."
outputs: [html, rss, json]
---

Every program that reads scans hands each file to a decoder, and decoders
have flaws. In October 2026 Pillow fixed more than thirty at once, several
of them reachable by opening a single crafted file. Anyone who runs an OCR
pipeline, a thumbnailer or an upload form has the same question each time
one is announced: *does this reach me, and what do I do?*

This page is our answer, written down. It comes from the work behind
[sillybos]({{< relref "/sillybos.md" >}}), the library that decides whether
a file may be opened before any decoder sees it: every advisory on the
libraries we watch is fetched weekly, read by a person, and recorded with
what triggers it, whether opening a file reaches it, whether a check before
decoding would have refused the file, and how to protect yourself with or
without that check. The record is [public
data](https://github.com/scattercode/sillybos/tree/main/docs/advisories/record)
in the sillybos repository; this page is built from it.

Three things it is not. It is not a vulnerability database: OSV.dev and the
GitHub Advisory Database are, and every row links to them. It is not a
claim that sillybos prevents everything: a row says **refused by default**
only where a test in the sillybos suite builds the triggering file and
proves it is refused, and many rows say plainly that nothing before the
decoder can help. And it is not advice to skip upgrading. The first line of
every "how to protect yourself" entry is the fixed version.

If you only want the general advice, read [Protecting
yourself]({{< relref "/security/protecting-yourself.md" >}}).
Loading
Loading