• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 34865332339
93%

Build:
DEFAULT BRANCH: main
Ran 14 Sep 2026 04:02PM UTC
Jobs 11
Files 1783
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Sep 2026 03:55PM UTC coverage: 92.903%. Remained the same
34865332339

push

github

web-flow
Percent-encode S3 object keys before signing the download URL (#23671)

The `s3` url handler signs a URL that differs from the URL it downloads,
so an object whose key contains a character that must be percent-encoded
— such as `+` — is unfetchable, failing with HTTP 403
`SignatureDoesNotMatch`.

Percent-encode the key once, before the URL is built, and sign the
encoded URL with `botocore.auth.S3SigV4Auth`:

```python
key = quote(unquote(request.key), safe="/~")
```

`S3SigV4Auth` signs the path verbatim (`SigV4Auth` re-encodes it and
collapses `.`/`..` segments, which are legal in a key), so the string
that is signed is the string that is downloaded. The `unquote` keeps
this idempotent for URLs that already spell the key encoded. Tests cover
both signing modes and both spellings of the key.

See the comment below for the canonical-path analysis, the verification
against a real bucket, and why `S3SigV4Auth` rather than encoding only
the downloaded URL.

---

**LLM assistance notice**
([policy](https://www.pantsbuild.org/dev/docs/contributions#llm-assistance-notice)):
the code and tests here were written primarily by Claude Code. I hit the
bug against a private S3 bucket, verified the signature mismatch and the
fix by hand against botocore 1.43.73, and reviewed and ran the tests.

7 of 7 new or added lines in 2 files covered. (100.0%)

95688 of 102998 relevant lines covered (92.9%)

3.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_9/10 - 34865332339.1 14 Sep 2026 04:07PM UTC 1225
54.02
GitHub Action Run
2 test_python_linux_x86_64_4/10 - 34865332339.2 14 Sep 2026 04:07PM UTC 1245
59.05
GitHub Action Run
3 test_python_linux_x86_64_1/10 - 34865332339.3 14 Sep 2026 04:06PM UTC 1215
48.88
GitHub Action Run
4 test_python_linux_x86_64_6/10 - 34865332339.4 14 Sep 2026 04:03PM UTC 1212
50.06
GitHub Action Run
5 test_python_linux_x86_64_2/10 - 34865332339.5 14 Sep 2026 04:04PM UTC 1215
58.59
GitHub Action Run
6 test_python_linux_x86_64_7/10 - 34865332339.6 14 Sep 2026 04:06PM UTC 1219
50.46
GitHub Action Run
7 test_python_linux_x86_64_5/10 - 34865332339.7 14 Sep 2026 04:04PM UTC 1230
60.27
GitHub Action Run
8 test_python_linux_x86_64_0/10 - 34865332339.8 14 Sep 2026 04:04PM UTC 1236
57.46
GitHub Action Run
9 test_python_linux_arm64 - 34865332339.9 14 Sep 2026 04:02PM UTC 1196
52.68
GitHub Action Run
10 test_python_linux_x86_64_8/10 - 34865332339.10 14 Sep 2026 04:07PM UTC 1214
52.73
GitHub Action Run
11 test_python_linux_x86_64_3/10 - 34865332339.11 14 Sep 2026 04:04PM UTC 1214
52.39
GitHub Action Run
Source Files on build 34865332339
  • Tree
  • List 1783
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34865332339
  • 9d33d95c on github
  • Prev Build on main (#34787035382)
  • Next Build on main (#34980155614)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc