Back to search
WebGPT
SkillWorks with CodexGitHub
A Codex skill that delegates work to ChatGPT on the web.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Checked today
Badge for your README
Markdown
[](/listings/nhahan--webgpt)HTML
<a href="/listings/nhahan--webgpt"><img src="/api/listings/nhahan--webgpt/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Paste this into Codex:
Install https://github.com/Nhahan/WebGPT/tree/main/skills/webgpt Follow references/setup.md; install, configure and verify everything yourself. I authorize the local Worker, accountless HTTPS forwarding, sharing its private URL with my signed-in ChatGPT, and full terminal access as my OS user for assigned projects (the project folder is not a sandbox). Choose Always allow for WebGPT permission prompts. Run the setup test, permanently delete its chats and close its tabs. Do not ask again for these approved actions. Ask only for sign-in or another genuinely user-only step, then continue. Do not require a new tunnel account or domain.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 58 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # WebGPT
- <img width="871" height="40" alt="image" src="https://github.com/user-attachments/assets/97d758f5-4666-4d21-9cc0-68a3f0fbcc88" />
- **Save your Codex quota.** A Codex skill that offloads work to ChatGPT on the web.
- ## Install
- Paste this into Codex:
- ```text
- Install https://github.com/Nhahan/WebGPT/tree/main/skills/webgpt
- Follow references/setup.md; install, configure and verify everything yourself.
- I authorize the local Worker, accountless HTTPS forwarding, sharing its private URL
- with my signed-in ChatGPT, and full terminal access as my OS user for assigned projects
- (the project folder is not a sandbox).
- Choose Always allow for WebGPT permission prompts. Run the setup test, permanently
- delete its chats and close its tabs. Do not ask again for these approved actions.
- Ask only for sign-in or another genuinely user-only step, then continue.
- Do not require a new tunnel account or domain.
- ```
- ## Use
- ### Delegate a task
- Tell Codex:
- ```text
- Use webgpt xh as subagents to develop this project's planned features in parallel.
- ```
- ```text
- webgpt p Research this topic and summarize the findings.
- ```
- | Mode | Level |
- | --- | --- |
- | `m` | Medium |
- | `h` | High |
- | `xh` | Extra High (default) |
- | `p` | Pro |
- ### Work directly in ChatGPT
- Tell Codex:
- ```text
- webgpt open
- ```
- Opens ChatGPT with terminal access to the current project.
- Or specify another project:
- ```text
- webgpt open /path/to/project
- ```
skills/webgpt/scripts/forwarding.test.mjs · Bundled script · 58 lines · 1 finding marked
- import {test} from 'node:test';
- import assert from 'node:assert/strict';
- import {mkdtempSync,rmSync,writeFileSync} from 'node:fs';
- import {tmpdir} from 'node:os';
- import {join} from 'node:path';
- import {forwardingOrigin,request,openProject} from './client.mjs';
- const oldOrigin='https://old-test.trycloudflare.com',newOrigin='https://new-test.trycloudflare.com';
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 8 on GitHub
- function fixture(run) {
- const dataDir=mkdtempSync(join(tmpdir(),'webgpt-forwarding-'));
- const config={dataDir,publicOrigin:oldOrigin};
- const save=value=>writeFileSync(join(dataDir,'tunnel.json'),JSON.stringify(value));
- return Promise.resolve().then(()=>run(config,save)).finally(()=>rmSync(dataDir,{recursive:true,force:true}));
- }
- test('legacy and verified managed connections need no network preflight',()=>fixture((config,save)=>{
- assert.equal(forwardingOrigin(config),oldOrigin);
- save({version:1,status:'running',origin:oldOrigin,pid:process.pid});
- assert.equal(forwardingOrigin(config),oldOrigin);
- }));
- test('changed origin blocks registration before controller credentials or mutation',()=>fixture(async(config,save)=>{
- save({version:1,status:'running',origin:newOrigin,pid:process.pid});
- await assert.rejects(request('register',{},config),/connection_needs_repair/);
- assert.equal(forwardingOrigin(config,{requireVerified:false}),newOrigin);
- config.publicOrigin=newOrigin;
- assert.equal(forwardingOrigin(config),newOrigin);
- }));
- test('unavailable and corrupt managed states fail closed including open mode',()=>fixture(async(config,save)=>{
- for(const state of [null,{}, {version:1,status:'starting',pid:process.pid},
- {version:1,status:'stopped',origin:oldOrigin,pid:process.pid},
- {version:1,status:'running',origin:oldOrigin,pid:2147483647},
- {version:1,status:'running',origin:oldOrigin+'/secret',pid:process.pid}]) {
- save(state);
- await assert.rejects(request('register',{},config),/tunnel_unavailable/);
- await assert.rejects(openProject(config.dataDir,config),/tunnel_unavailable/);
- }
- writeFileSync(join(config.dataDir,'tunnel.json'),'{');
- assert.throws(()=>forwardingOrigin(config),/tunnel_state_invalid/);
- }));
- test('open follows a changed managed origin without renewing or replacing its lease',async()=>{
- const {start}=await import('./worker.mjs');
- await fixture(async(config,save)=>{
- const service=await start({dir:config.dataDir,port:0,controlPort:0});
- Object.assign(config,{mcpPort:service.mcpPort,controlPort:service.controlPort});
- try {
- save({version:1,status:'running',origin:oldOrigin,pid:process.pid});
- const first=await openProject(config.dataDir,config);
- save({version:1,status:'running',origin:newOrigin,pid:process.pid});
- const next=await openProject(config.dataDir,config);
- assert.equal(next.id,first.id);
- assert.equal(next.idleExpiresAt,first.idleExpiresAt);
- assert.notEqual(next.connectionName,first.connectionName);
- assert.equal(next.connectionUrl,newOrigin+first.connectionPath);
- assert.equal(config.publicOrigin,oldOrigin);
- await request('cancel',{id:first.id},config);
- } finally {await service.close();}
- });
- });
skills/webgpt/scripts/tunnel.test.mjs · Bundled script · 120 lines · 13 findings marked
- import {test} from 'node:test';
- import assert from 'node:assert/strict';
- import {EventEmitter} from 'node:events';
- import {PassThrough} from 'node:stream';
- import {mkdtempSync,readFileSync,writeFileSync,statSync,rmSync,readdirSync} from 'node:fs';
- import {tmpdir} from 'node:os';
- import {join} from 'node:path';
- import {originParser,startTunnel} from './tunnel.mjs';
- function fixture() {
- const dataDir=mkdtempSync(join(tmpdir(),'webgpt-tunnel-'));
- const child=new EventEmitter();child.stdout=new PassThrough();child.stderr=new PassThrough();child.signals=[];
- child.kill=signal=>{child.signals.push(signal);return true;};child.unref=()=>{child.unreferenced=true;};
- const config={dataDir,mcpPort:43137,publicOrigin:'https://verified.example'};
- return {dataDir,child,config,state:()=>JSON.parse(readFileSync(join(dataDir,'tunnel.json'),'utf8')),cleanup:()=>rmSync(dataDir,{recursive:true,force:true})};
- }
- test('origin parser handles chunk boundaries and refuses prefixes, credentials and invalid labels',()=>{
- const origins=[];const parser=originParser(value=>origins.push(value));
- for(const invalid of [
- 'http://abc.trycloudflare.com','https://-abc.trycloudflare.com','https://abc-.trycloudflare.com',
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 21 on GitHub
- `https://${'a'.repeat(64)}.trycloudflare.com`,'https://abc.trycloudflare.com.evil',
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 22 on GitHub
- 'https://abc.trycloudflare.com/path','https://abc.trycloudflare.com:443',
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 23 on GitHub
- 'https://user@abc.trycloudflare.com','https://abc.trycloudflare.com?key=secret',
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 24 on GitHub
- ])parser.push(invalid+'\n');
- assert.deepEqual(origins,[]);
- parser.push('log https://split-');parser.push('origin.trycloudflare.co');parser.push('m');
- assert.deepEqual(origins,[]);
- parser.push(' |\n');assert.equal(origins[0],'https://split-origin.trycloudflare.com');
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 29 on GitHub
- const ended=[];const last=originParser(value=>ended.push(value));last.push('https://a.trycloudflare.com');last.end();
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 30 on GitHub
- assert.deepEqual(ended,['https://a.trycloudflare.com']);
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 31 on GitHub
- });
- test('large noise is bounded and does not prevent a later split origin',()=>{
- const values=[];const parser=originParser(value=>values.push(value));
- parser.push('x'.repeat(1000000)+'\nhttps://later-');parser.push('origin.trycloudflare.com\n');
- assert.equal(values[0],'https://later-origin.trycloudflare.com');
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 37 on GitHub
- parser.push('x'.repeat(100000)+'\nhttps://middle.trycloudflare.com\n'+'x'.repeat(100000));
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 38 on GitHub
- assert.deepEqual(values,['https://later-origin.trycloudflare.com','https://middle.trycloudflare.com']);
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 39 on GitHub
- });
- test('lifecycle clears stale origin, publishes private running state and never changes verified config',async()=>{
- const f=fixture();
- try {
- writeFileSync(join(f.dataDir,'tunnel.json'),JSON.stringify({version:1,status:'running',origin:'https://stale.trycloudflare.com',pid:9}));
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 45 on GitHub
- const configPath=join(f.dataDir,'config.json');writeFileSync(configPath,JSON.stringify(f.config));
- const original=readFileSync(configPath,'utf8');const calls=[],states=[];
- const tunnel=startTunnel('/fake/cloudflared',f.config,{pid:123,spawnChild:(...args)=>{calls.push(args);return f.child;},onState:value=>states.push(value)});
- assert.deepEqual(f.state(),{version:1,status:'starting',pid:123});
- assert.deepEqual(calls,[['/fake/cloudflared',['tunnel','--url','http://127.0.0.1:43137'],{shell:false,stdio:['ignore','pipe','pipe']}] ]);
- f.child.stdout.write('irrelevant secret log\n');
- f.child.stderr.write('INF | https://fresh-');f.child.stderr.write('origin.trycloudflare.com |\n');
- assert.deepEqual(f.state(),{version:1,status:'running',origin:'https://fresh-origin.trycloudflare.com',pid:123});
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 53 on GitHub
- // Windows does not expose POSIX owner/group permission bits.
- if(process.platform!=='win32')assert.equal(statSync(join(f.dataDir,'tunnel.json')).mode&0o777,0o600);
- assert.equal(readFileSync(configPath,'utf8'),original);
- assert.deepEqual(states,[{status:'starting'},{status:'running'}]);
- f.child.emit('exit',0,null);assert.deepEqual(await tunnel.done,{code:0,signal:null});
- assert.deepEqual(f.state(),{version:1,status:'stopped',pid:123});
- assert.equal(readdirSync(f.dataDir).some(name=>name.endsWith('.tmp')),false);
- } finally {f.cleanup();}
- });
- test('launch exceptions and asynchronous errors produce stopped state without raw errors',async()=>{
- for(const synchronous of [true,false]) {
- const f=fixture();
- try {
- const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>{
- if(synchronous)throw Error('secret launch detail');return f.child;
- }});
- if(!synchronous)f.child.emit('error',Error('secret launch detail'));
- assert.deepEqual(await tunnel.done,{error:'tunnel launch failed'});
- assert.equal(f.state().status,'stopped');assert.equal(f.state().origin,undefined);
- } finally {f.cleanup();}
- }
- });
- test('shutdown forwards the requested signal once and stops cleanly on child exit',async()=>{
- const f=fixture();
- try {
- const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>f.child,graceMs:10,killWaitMs:10});
- const done=tunnel.stop('SIGINT');assert.equal(tunnel.stop('SIGTERM'),done);
- f.child.emit('exit',null,'SIGINT');
- assert.deepEqual(await done,{code:null,signal:'SIGINT'});
- assert.deepEqual(f.child.signals,['SIGINT']);assert.equal(f.state().status,'stopped');
- } finally {f.cleanup();}
- });
- test('unresponsive child shutdown escalates and settles within bounded time',async()=>{
- const f=fixture();
- try {
- const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>f.child,graceMs:1,killWaitMs:1});
- const result=await tunnel.stop();
- assert.deepEqual(result,{error:'tunnel shutdown unconfirmed'});
- assert.deepEqual(f.child.signals,['SIGTERM','SIGKILL']);assert.equal(f.child.unreferenced,true);
- assert.equal(f.child.stdout.destroyed,true);assert.equal(f.state().status,'stopped');
- assert.equal(readdirSync(f.dataDir).includes('tunnel.lock'),true);
- assert.throws(()=>startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>assert.fail('duplicate launch')}),/owner lock exists/);
- f.child.emit('exit',0,null);assert.deepEqual(await tunnel.done,result);
- } finally {f.cleanup();}
- });
- test('exclusive ownership rejects live and stale locks before spawning or changing state',async()=>{
- const f=fixture();
- try {
- let spawns=0;
- const spawnChild=()=>{spawns++;return f.child;};
- const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild});
- f.child.stderr.write('https://owned.trycloudflare.com\n');
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 110 on GitHub
- const current=readFileSync(join(f.dataDir,'tunnel.json'),'utf8');
- assert.throws(()=>startTunnel('/fake/cloudflared',f.config,{spawnChild}),/owner lock exists/);
- assert.equal(spawns,1);assert.equal(readFileSync(join(f.dataDir,'tunnel.json'),'utf8'),current);
- f.child.emit('exit',0,null);await tunnel.done;
- assert.equal(readdirSync(f.dataDir).includes('tunnel.lock'),false);
- writeFileSync(join(f.dataDir,'tunnel.lock'),JSON.stringify({pid:999999999,nonce:'stale'}));
- assert.throws(()=>startTunnel('/fake/cloudflared',f.config,{spawnChild}),/owner lock exists/);
- assert.equal(spawns,1);assert.equal(f.state().status,'stopped');
- } finally {f.cleanup();}
- });
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.