Skip to content
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
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/nhahan--webgpt/badge.svg)](/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)

  1. # WebGPT
  2. <img width="871" height="40" alt="image" src="https://github.com/user-attachments/assets/97d758f5-4666-4d21-9cc0-68a3f0fbcc88" />
  3. **Save your Codex quota.** A Codex skill that offloads work to ChatGPT on the web.
  4. ## Install
  5. Paste this into Codex:
  6. ```text
  7. Install https://github.com/Nhahan/WebGPT/tree/main/skills/webgpt
  8. Follow references/setup.md; install, configure and verify everything yourself.
  9. I authorize the local Worker, accountless HTTPS forwarding, sharing its private URL
  10. with my signed-in ChatGPT, and full terminal access as my OS user for assigned projects
  11. (the project folder is not a sandbox).
  12. Choose Always allow for WebGPT permission prompts. Run the setup test, permanently
  13. delete its chats and close its tabs. Do not ask again for these approved actions.
  14. Ask only for sign-in or another genuinely user-only step, then continue.
  15. Do not require a new tunnel account or domain.
  16. ```
  17. ## Use
  18. ### Delegate a task
  19. Tell Codex:
  20. ```text
  21. Use webgpt xh as subagents to develop this project's planned features in parallel.
  22. ```
  23. ```text
  24. webgpt p Research this topic and summarize the findings.
  25. ```
  26. | Mode | Level |
  27. | --- | --- |
  28. | `m` | Medium |
  29. | `h` | High |
  30. | `xh` | Extra High (default) |
  31. | `p` | Pro |
  32. ### Work directly in ChatGPT
  33. Tell Codex:
  34. ```text
  35. webgpt open
  36. ```
  37. Opens ChatGPT with terminal access to the current project.
  38. Or specify another project:
  39. ```text
  40. webgpt open /path/to/project
  41. ```
skills/webgpt/scripts/forwarding.test.mjs · Bundled script · 58 lines · 1 finding marked
  1. import {test} from 'node:test';
  2. import assert from 'node:assert/strict';
  3. import {mkdtempSync,rmSync,writeFileSync} from 'node:fs';
  4. import {tmpdir} from 'node:os';
  5. import {join} from 'node:path';
  6. import {forwardingOrigin,request,openProject} from './client.mjs';
  7. 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
  8. function fixture(run) {
  9. const dataDir=mkdtempSync(join(tmpdir(),'webgpt-forwarding-'));
  10. const config={dataDir,publicOrigin:oldOrigin};
  11. const save=value=>writeFileSync(join(dataDir,'tunnel.json'),JSON.stringify(value));
  12. return Promise.resolve().then(()=>run(config,save)).finally(()=>rmSync(dataDir,{recursive:true,force:true}));
  13. }
  14. test('legacy and verified managed connections need no network preflight',()=>fixture((config,save)=>{
  15. assert.equal(forwardingOrigin(config),oldOrigin);
  16. save({version:1,status:'running',origin:oldOrigin,pid:process.pid});
  17. assert.equal(forwardingOrigin(config),oldOrigin);
  18. }));
  19. test('changed origin blocks registration before controller credentials or mutation',()=>fixture(async(config,save)=>{
  20. save({version:1,status:'running',origin:newOrigin,pid:process.pid});
  21. await assert.rejects(request('register',{},config),/connection_needs_repair/);
  22. assert.equal(forwardingOrigin(config,{requireVerified:false}),newOrigin);
  23. config.publicOrigin=newOrigin;
  24. assert.equal(forwardingOrigin(config),newOrigin);
  25. }));
  26. test('unavailable and corrupt managed states fail closed including open mode',()=>fixture(async(config,save)=>{
  27. for(const state of [null,{}, {version:1,status:'starting',pid:process.pid},
  28. {version:1,status:'stopped',origin:oldOrigin,pid:process.pid},
  29. {version:1,status:'running',origin:oldOrigin,pid:2147483647},
  30. {version:1,status:'running',origin:oldOrigin+'/secret',pid:process.pid}]) {
  31. save(state);
  32. await assert.rejects(request('register',{},config),/tunnel_unavailable/);
  33. await assert.rejects(openProject(config.dataDir,config),/tunnel_unavailable/);
  34. }
  35. writeFileSync(join(config.dataDir,'tunnel.json'),'{');
  36. assert.throws(()=>forwardingOrigin(config),/tunnel_state_invalid/);
  37. }));
  38. test('open follows a changed managed origin without renewing or replacing its lease',async()=>{
  39. const {start}=await import('./worker.mjs');
  40. await fixture(async(config,save)=>{
  41. const service=await start({dir:config.dataDir,port:0,controlPort:0});
  42. Object.assign(config,{mcpPort:service.mcpPort,controlPort:service.controlPort});
  43. try {
  44. save({version:1,status:'running',origin:oldOrigin,pid:process.pid});
  45. const first=await openProject(config.dataDir,config);
  46. save({version:1,status:'running',origin:newOrigin,pid:process.pid});
  47. const next=await openProject(config.dataDir,config);
  48. assert.equal(next.id,first.id);
  49. assert.equal(next.idleExpiresAt,first.idleExpiresAt);
  50. assert.notEqual(next.connectionName,first.connectionName);
  51. assert.equal(next.connectionUrl,newOrigin+first.connectionPath);
  52. assert.equal(config.publicOrigin,oldOrigin);
  53. await request('cancel',{id:first.id},config);
  54. } finally {await service.close();}
  55. });
  56. });
skills/webgpt/scripts/tunnel.test.mjs · Bundled script · 120 lines · 13 findings marked
  1. import {test} from 'node:test';
  2. import assert from 'node:assert/strict';
  3. import {EventEmitter} from 'node:events';
  4. import {PassThrough} from 'node:stream';
  5. import {mkdtempSync,readFileSync,writeFileSync,statSync,rmSync,readdirSync} from 'node:fs';
  6. import {tmpdir} from 'node:os';
  7. import {join} from 'node:path';
  8. import {originParser,startTunnel} from './tunnel.mjs';
  9. function fixture() {
  10. const dataDir=mkdtempSync(join(tmpdir(),'webgpt-tunnel-'));
  11. const child=new EventEmitter();child.stdout=new PassThrough();child.stderr=new PassThrough();child.signals=[];
  12. child.kill=signal=>{child.signals.push(signal);return true;};child.unref=()=>{child.unreferenced=true;};
  13. const config={dataDir,mcpPort:43137,publicOrigin:'https://verified.example'};
  14. return {dataDir,child,config,state:()=>JSON.parse(readFileSync(join(dataDir,'tunnel.json'),'utf8')),cleanup:()=>rmSync(dataDir,{recursive:true,force:true})};
  15. }
  16. test('origin parser handles chunk boundaries and refuses prefixes, credentials and invalid labels',()=>{
  17. const origins=[];const parser=originParser(value=>origins.push(value));
  18. for(const invalid of [
  19. '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
  20. `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
  21. '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
  22. '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
  23. ])parser.push(invalid+'\n');
  24. assert.deepEqual(origins,[]);
  25. parser.push('log https://split-');parser.push('origin.trycloudflare.co');parser.push('m');
  26. assert.deepEqual(origins,[]);
  27. 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
  28. 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
  29. 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
  30. });
  31. test('large noise is bounded and does not prevent a later split origin',()=>{
  32. const values=[];const parser=originParser(value=>values.push(value));
  33. parser.push('x'.repeat(1000000)+'\nhttps://later-');parser.push('origin.trycloudflare.com\n');
  34. 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
  35. 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
  36. 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
  37. });
  38. test('lifecycle clears stale origin, publishes private running state and never changes verified config',async()=>{
  39. const f=fixture();
  40. try {
  41. 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
  42. const configPath=join(f.dataDir,'config.json');writeFileSync(configPath,JSON.stringify(f.config));
  43. const original=readFileSync(configPath,'utf8');const calls=[],states=[];
  44. const tunnel=startTunnel('/fake/cloudflared',f.config,{pid:123,spawnChild:(...args)=>{calls.push(args);return f.child;},onState:value=>states.push(value)});
  45. assert.deepEqual(f.state(),{version:1,status:'starting',pid:123});
  46. assert.deepEqual(calls,[['/fake/cloudflared',['tunnel','--url','http://127.0.0.1:43137'],{shell:false,stdio:['ignore','pipe','pipe']}] ]);
  47. f.child.stdout.write('irrelevant secret log\n');
  48. f.child.stderr.write('INF | https://fresh-');f.child.stderr.write('origin.trycloudflare.com |\n');
  49. 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
  50. // Windows does not expose POSIX owner/group permission bits.
  51. if(process.platform!=='win32')assert.equal(statSync(join(f.dataDir,'tunnel.json')).mode&0o777,0o600);
  52. assert.equal(readFileSync(configPath,'utf8'),original);
  53. assert.deepEqual(states,[{status:'starting'},{status:'running'}]);
  54. f.child.emit('exit',0,null);assert.deepEqual(await tunnel.done,{code:0,signal:null});
  55. assert.deepEqual(f.state(),{version:1,status:'stopped',pid:123});
  56. assert.equal(readdirSync(f.dataDir).some(name=>name.endsWith('.tmp')),false);
  57. } finally {f.cleanup();}
  58. });
  59. test('launch exceptions and asynchronous errors produce stopped state without raw errors',async()=>{
  60. for(const synchronous of [true,false]) {
  61. const f=fixture();
  62. try {
  63. const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>{
  64. if(synchronous)throw Error('secret launch detail');return f.child;
  65. }});
  66. if(!synchronous)f.child.emit('error',Error('secret launch detail'));
  67. assert.deepEqual(await tunnel.done,{error:'tunnel launch failed'});
  68. assert.equal(f.state().status,'stopped');assert.equal(f.state().origin,undefined);
  69. } finally {f.cleanup();}
  70. }
  71. });
  72. test('shutdown forwards the requested signal once and stops cleanly on child exit',async()=>{
  73. const f=fixture();
  74. try {
  75. const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>f.child,graceMs:10,killWaitMs:10});
  76. const done=tunnel.stop('SIGINT');assert.equal(tunnel.stop('SIGTERM'),done);
  77. f.child.emit('exit',null,'SIGINT');
  78. assert.deepEqual(await done,{code:null,signal:'SIGINT'});
  79. assert.deepEqual(f.child.signals,['SIGINT']);assert.equal(f.state().status,'stopped');
  80. } finally {f.cleanup();}
  81. });
  82. test('unresponsive child shutdown escalates and settles within bounded time',async()=>{
  83. const f=fixture();
  84. try {
  85. const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>f.child,graceMs:1,killWaitMs:1});
  86. const result=await tunnel.stop();
  87. assert.deepEqual(result,{error:'tunnel shutdown unconfirmed'});
  88. assert.deepEqual(f.child.signals,['SIGTERM','SIGKILL']);assert.equal(f.child.unreferenced,true);
  89. assert.equal(f.child.stdout.destroyed,true);assert.equal(f.state().status,'stopped');
  90. assert.equal(readdirSync(f.dataDir).includes('tunnel.lock'),true);
  91. assert.throws(()=>startTunnel('/fake/cloudflared',f.config,{spawnChild:()=>assert.fail('duplicate launch')}),/owner lock exists/);
  92. f.child.emit('exit',0,null);assert.deepEqual(await tunnel.done,result);
  93. } finally {f.cleanup();}
  94. });
  95. test('exclusive ownership rejects live and stale locks before spawning or changing state',async()=>{
  96. const f=fixture();
  97. try {
  98. let spawns=0;
  99. const spawnChild=()=>{spawns++;return f.child;};
  100. const tunnel=startTunnel('/fake/cloudflared',f.config,{spawnChild});
  101. 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
  102. const current=readFileSync(join(f.dataDir,'tunnel.json'),'utf8');
  103. assert.throws(()=>startTunnel('/fake/cloudflared',f.config,{spawnChild}),/owner lock exists/);
  104. assert.equal(spawns,1);assert.equal(readFileSync(join(f.dataDir,'tunnel.json'),'utf8'),current);
  105. f.child.emit('exit',0,null);await tunnel.done;
  106. assert.equal(readdirSync(f.dataDir).includes('tunnel.lock'),false);
  107. writeFileSync(join(f.dataDir,'tunnel.lock'),JSON.stringify({pid:999999999,nonce:'stale'}));
  108. assert.throws(()=>startTunnel('/fake/cloudflared',f.config,{spawnChild}),/owner lock exists/);
  109. assert.equal(spawns,1);assert.equal(f.state().status,'stopped');
  110. } finally {f.cleanup();}
  111. });

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.