weekly-report.lock.yml 123 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  1. # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"9c9c999041937a973449b42469cc1fc544f7d548c5ecbfb9a78a7cd33c7e4402","body_hash":"6b24abcba9aa7cf0b67ca6c52242a557782e72c315cb9e935e00e501f40f1e84","compiler_version":"v0.89.21","strict":true,"agent_id":"codex","agent_model":"gpt-5.6-luna","engine_versions":{"codex":"0.154.0"}}
  2. # gh-aw-manifest: {"version":1,"secrets":["CODEX_API_KEY","COPILOT_GITHUB_TOKEN","GH_AW_DEFAULT_OTLP_ENDPOINT","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN","OPENAI_API_KEY","PIXEL_API_KEY"],"actions":[{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"924af5fdc64061cfbf66fb584c8b07e2ac230c60","version":"v0.89.21"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.28.23","digest":"sha256:2c78aaba1c108e130e2d6d01e4f2cca334ea04c53e6f258913ac34173fe7e3b2","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.28.23@sha256:2c78aaba1c108e130e2d6d01e4f2cca334ea04c53e6f258913ac34173fe7e3b2"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.23","digest":"sha256:c15c3d1208df10c5b588a3657be53742aa982ae0909d1eb1812525268794ca64","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.23@sha256:c15c3d1208df10c5b588a3657be53742aa982ae0909d1eb1812525268794ca64"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.28.23","digest":"sha256:02ffc56dd40158223064ef03a78c2d9717473c93723b4e403d455ea6f0b09ae0","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.28.23@sha256:02ffc56dd40158223064ef03a78c2d9717473c93723b4e403d455ea6f0b09ae0"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.25","digest":"sha256:9be0a86220e807a0ecc89e53d7453468f7a53fbc6b3d1efd2299025ffe01d086","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.25@sha256:9be0a86220e807a0ecc89e53d7453468f7a53fbc6b3d1efd2299025ffe01d086"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:11c2c544876cdbaffefe0f7f1283b74838c209654b4934a78e23ed11f750490f","pinned_image":"ghcr.io/github/gh-aw-node@sha256:11c2c544876cdbaffefe0f7f1283b74838c209654b4934a78e23ed11f750490f"},{"image":"ghcr.io/github/github-mcp-server:v1.12.2","digest":"sha256:508a0857ec762b1ab1cece29193345b501fab1dd9d1228a7b617062954cecac6","pinned_image":"ghcr.io/github/github-mcp-server:v1.12.2@sha256:508a0857ec762b1ab1cece29193345b501fab1dd9d1228a7b617062954cecac6"}],"mcp_servers":[{"name":"github","tools":["get_commit","get_file_contents","get_latest_release","get_me","get_pull_request","get_pull_request_comments","get_pull_request_diff","get_pull_request_files","get_pull_request_review_comments","get_pull_request_reviews","get_pull_request_status","get_release_by_tag","get_tag","issue_read","list_branches","list_commits","list_issue_types","list_issues","list_pull_requests","list_releases","list_starred_repositories","list_tags","pull_request_read","search_code","search_issues","search_pull_requests","search_repositories"]},{"name":"safeoutputs","tools":["create_issue","missing_data","missing_tool","noop"]}]}
  3. # This file was automatically generated by gh-aw (v0.89.21). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
  4. #
  5. # ___ _ _
  6. # / _ \ | | (_)
  7. # | |_| | __ _ ___ _ __ | |_ _ ___
  8. # | _ |/ _` |/ _ \ '_ \| __| |/ __|
  9. # | | | | (_| | __/ | | | |_| | (__
  10. # \_| |_/\__, |\___|_| |_|\__|_|\___|
  11. # __/ |
  12. # _ _ |___/
  13. # | | | | / _| |
  14. # | | | | ___ _ __ _ __| |_| | _____ ____
  15. # | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
  16. # \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
  17. # \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
  18. #
  19. #
  20. # To update this file, edit the corresponding .md file and run:
  21. # gh aw compile
  22. # Not all edits will cause changes to this file.
  23. #
  24. # For more information: https://github.github.com/gh-aw/introduction/overview/
  25. #
  26. # 每周自动生成仓库活动报告,包括 PR/Issue 列表、Changelog、贡献者统计等
  27. #
  28. # Resolved workflow manifest:
  29. # Imports:
  30. # - shared/engine.md
  31. # - shared/network.md
  32. #
  33. # Secrets used:
  34. # - CODEX_API_KEY
  35. # - COPILOT_GITHUB_TOKEN
  36. # - GH_AW_DEFAULT_OTLP_ENDPOINT
  37. # - GH_AW_DEFAULT_OTLP_HEADERS
  38. # - GH_AW_GITHUB_MCP_SERVER_TOKEN
  39. # - GH_AW_GITHUB_TOKEN
  40. # - GITHUB_TOKEN
  41. # - OPENAI_API_KEY
  42. # - PIXEL_API_KEY
  43. #
  44. # Custom actions used:
  45. # - actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  46. # - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  47. # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  48. # - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 (source v9)
  49. # - actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
  50. # - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  51. # - github/gh-aw-actions/setup@924af5fdc64061cfbf66fb584c8b07e2ac230c60 # v0.89.21
  52. #
  53. # Container images used:
  54. # - ghcr.io/github/gh-aw-firewall/agent:0.28.23@sha256:2c78aaba1c108e130e2d6d01e4f2cca334ea04c53e6f258913ac34173fe7e3b2
  55. # - ghcr.io/github/gh-aw-firewall/api-proxy:0.28.23@sha256:c15c3d1208df10c5b588a3657be53742aa982ae0909d1eb1812525268794ca64
  56. # - ghcr.io/github/gh-aw-firewall/squid:0.28.23@sha256:02ffc56dd40158223064ef03a78c2d9717473c93723b4e403d455ea6f0b09ae0
  57. # - ghcr.io/github/gh-aw-mcpg:v0.4.25@sha256:9be0a86220e807a0ecc89e53d7453468f7a53fbc6b3d1efd2299025ffe01d086
  58. # - ghcr.io/github/gh-aw-node@sha256:11c2c544876cdbaffefe0f7f1283b74838c209654b4934a78e23ed11f750490f
  59. # - ghcr.io/github/github-mcp-server:v1.12.2@sha256:508a0857ec762b1ab1cece29193345b501fab1dd9d1228a7b617062954cecac6
  60. name: "Weekly Report"
  61. on:
  62. schedule:
  63. - cron: "11 17 * * 4" # Friendly format: weekly on thursday (scattered)
  64. workflow_dispatch:
  65. inputs:
  66. aw_context:
  67. default: ""
  68. description: "Agent caller context (used internally by Agentic Workflows)."
  69. required: false
  70. type: string
  71. permissions: {}
  72. concurrency:
  73. group: "gh-aw-${{ github.workflow }}"
  74. queue: max
  75. run-name: "Weekly Report"
  76. env:
  77. OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_DEFAULT_OTLP_ENDPOINT || vars.GH_AW_DEFAULT_OTLP_ENDPOINT }}
  78. OTEL_SERVICE_NAME: gh-aw.weekly-report
  79. OTEL_RESOURCE_ATTRIBUTES: 'gh-aw.workflow.name=Weekly%20Report,gh-aw.repository=${{ github.repository }},gh-aw.run.id=${{ github.run_id }},github.run_id=${{ github.run_id }},gh-aw.engine.id=codex'
  80. OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_DEFAULT_OTLP_HEADERS }}
  81. GH_AW_OTLP_ENDPOINTS: '[{"url":"${{ secrets.GH_AW_DEFAULT_OTLP_ENDPOINT || vars.GH_AW_DEFAULT_OTLP_ENDPOINT }}","headers":"${{ secrets.GH_AW_DEFAULT_OTLP_HEADERS }}"}]'
  82. GH_AW_OTLP_IF_MISSING: ignore
  83. jobs:
  84. activation:
  85. runs-on: ubuntu-slim
  86. permissions:
  87. actions: read
  88. contents: read
  89. issues: write
  90. env:
  91. GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
  92. GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
  93. outputs:
  94. comment_id: ""
  95. comment_repo: ""
  96. daily_ai_credits_exceeded: ${{ steps.daily-ai-credits-workflow-guardrail.outputs.daily_ai_credits_exceeded == 'true' }}
  97. daily_ai_credits_guardrail_error: ${{ steps.daily-ai-credits-workflow-guardrail.outputs.daily_ai_credits_guardrail_error || '' }}
  98. daily_ai_credits_guardrail_status: ${{ steps.daily-ai-credits-workflow-guardrail.outputs.daily_ai_credits_guardrail_status || '' }}
  99. daily_ai_credits_threshold: ${{ steps.daily-ai-credits-workflow-guardrail.outputs.daily_ai_credits_threshold || '' }}
  100. daily_ai_credits_total: ${{ steps.daily-ai-credits-workflow-guardrail.outputs.daily_ai_credits_total || '' }}
  101. engine_id: ${{ steps.generate_aw_info.outputs.engine_id }}
  102. lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
  103. model: ${{ steps.generate_aw_info.outputs.model }}
  104. oauth_token_check_failed: ${{ steps.check-oauth-tokens.outputs.oauth_token_check_failed == 'true' }}
  105. secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }}
  106. setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
  107. setup-span-id: ${{ steps.setup.outputs.span-id }}
  108. setup-trace-id: ${{ steps.setup.outputs.trace-id }}
  109. stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }}
  110. steps:
  111. - name: Setup Scripts
  112. id: setup
  113. uses: github/gh-aw-actions/setup@924af5fdc64061cfbf66fb584c8b07e2ac230c60 # v0.89.21
  114. with:
  115. destination: ${{ runner.temp }}/gh-aw/actions
  116. job-name: ${{ github.job }}
  117. safe-output-artifact-client: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
  118. env:
  119. GH_AW_SETUP_WORKFLOW_NAME: "Weekly Report"
  120. GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/weekly-report.lock.yml@${{ github.ref }}
  121. GH_AW_INFO_VERSION: "0.154.0"
  122. GH_AW_INFO_AWF_VERSION: "v0.28.23"
  123. GH_AW_INFO_ENGINE_ID: "codex"
  124. - name: Mask OTLP telemetry headers
  125. run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
  126. - name: Generate agentic run info
  127. id: generate_aw_info
  128. env:
  129. GH_AW_INFO_ENGINE_ID: "codex"
  130. GH_AW_INFO_ENGINE_NAME: "Codex"
  131. GH_AW_INFO_MODEL: "gpt-5.6-luna"
  132. GH_AW_INFO_VERSION: "0.154.0"
  133. GH_AW_INFO_AGENT_VERSION: "0.154.0"
  134. GH_AW_INFO_CLI_VERSION: "v0.89.21"
  135. GH_AW_INFO_WORKFLOW_NAME: "Weekly Report"
  136. GH_AW_INFO_EXPERIMENTAL: "false"
  137. GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
  138. GH_AW_INFO_STAGED: "false"
  139. GH_AW_INFO_ALLOWED_DOMAINS: '["ai-pixel.online","api-inference.modelscope.cn","api.commandcode.ai","api.deepseek.com","api.minimaxi.com","defaults","open.bigmodel.cn","opencode.ai"]'
  140. GH_AW_INFO_FIREWALL_ENABLED: "true"
  141. GH_AW_INFO_AWF_VERSION: "v0.28.23"
  142. GH_AW_INFO_AWMG_VERSION: ""
  143. GH_AW_INFO_FIREWALL_TYPE: "squid"
  144. GH_AW_INFO_AGENT_RUNTIME: ""
  145. GH_AW_COMPILED_STRICT: "true"
  146. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  147. with:
  148. script: |
  149. const path = require('path');
  150. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  151. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  152. setupGlobals(core, github, context, exec, io, getOctokit);
  153. const { main } = require(path.join(actionsDir, 'generate_aw_info.cjs'));
  154. await main(core, context);
  155. - name: Restore daily AIC scan observations
  156. id: restore-daily-aic-cache-fallback
  157. if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
  158. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  159. env:
  160. GH_AW_HAS_SLASH_COMMAND: "false"
  161. GH_AW_HAS_LABEL_COMMAND: "false"
  162. with:
  163. github-token: ${{ secrets.GITHUB_TOKEN }}
  164. script: |
  165. const path = require('path');
  166. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  167. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  168. setupGlobals(core, github, context, exec, io, getOctokit);
  169. const { main } = require(path.join(actionsDir, 'restore_aic_scan_cache.cjs'));
  170. await main();
  171. - name: Check daily workflow token guardrail
  172. id: daily-ai-credits-workflow-guardrail
  173. if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
  174. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  175. env:
  176. GH_AW_WORKFLOW_NAME: "Weekly Report"
  177. GH_AW_WORKFLOW_ID: "weekly-report"
  178. GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  179. GH_AW_WORKFLOW_DISPATCH_AW_CONTEXT: ${{ github.event.inputs.aw_context || '' }}
  180. GH_AW_HAS_SLASH_COMMAND: "false"
  181. GH_AW_HAS_LABEL_COMMAND: "false"
  182. GH_AW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  183. GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
  184. GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_AI_CREDITS || '1000' }}
  185. with:
  186. github-token: ${{ secrets.GITHUB_TOKEN }}
  187. script: |
  188. const path = require('path');
  189. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  190. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  191. setupGlobals(core, github, context, exec, io, getOctokit);
  192. const { main } = require(path.join(actionsDir, 'check_daily_aic_workflow_guardrail.cjs'));
  193. await main();
  194. - name: Publish daily AIC scan observations
  195. if: always() && env.GH_AW_MAX_DAILY_AI_CREDITS != ''
  196. continue-on-error: true
  197. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  198. with:
  199. name: aic-usage-scan-v2
  200. path: /tmp/gh-aw/agentic-workflow-usage-scan-v2.jsonl
  201. overwrite: true
  202. if-no-files-found: ignore
  203. retention-days: 3
  204. - name: Validate CODEX_API_KEY or OPENAI_API_KEY secret
  205. id: validate-secret
  206. run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_multi_secret.sh" CODEX_API_KEY OPENAI_API_KEY Codex https://github.github.com/gh-aw/reference/engines/#openai-codex
  207. env:
  208. CODEX_API_KEY: ${{ secrets.CODEX_API_KEY }}
  209. OPENAI_API_KEY: ${{ secrets.PIXEL_API_KEY }}
  210. - name: Check for OAuth tokens
  211. id: check-oauth-tokens
  212. run: bash "${RUNNER_TEMP}/gh-aw/actions/check_oauth_tokens.sh"
  213. env:
  214. COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
  215. GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
  216. GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
  217. - name: Checkout .github and .agents folders
  218. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  219. with:
  220. persist-credentials: false
  221. sparse-checkout: |
  222. .github
  223. .agents
  224. .claude
  225. .codex
  226. .gemini
  227. .pi
  228. sparse-checkout-cone-mode: true
  229. fetch-depth: 1
  230. - name: Save agent config folders for base branch restoration
  231. env:
  232. GH_AW_AGENT_FOLDERS: ".agents .codex .github"
  233. GH_AW_AGENT_FILES: "AGENTS.md"
  234. run: |
  235. bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh"
  236. - name: Check workflow lock file
  237. id: check-lock-file
  238. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  239. env:
  240. GH_AW_WORKFLOW_FILE: "weekly-report.lock.yml"
  241. GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}"
  242. with:
  243. script: |
  244. const path = require('path');
  245. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  246. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  247. setupGlobals(core, github, context, exec, io, getOctokit);
  248. const { main } = require(path.join(actionsDir, 'check_workflow_timestamp_api.cjs'));
  249. await main();
  250. - name: Check compile-agentic version
  251. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  252. env:
  253. GH_AW_COMPILED_VERSION: "v0.89.21"
  254. GH_AW_BLOCKED_VERSION_REPORT_AS_ISSUE: "true"
  255. GH_AW_WORKFLOW_NAME: "Weekly Report"
  256. with:
  257. script: |
  258. const path = require('path');
  259. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  260. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  261. setupGlobals(core, github, context, exec, io, getOctokit);
  262. const { main } = require(path.join(actionsDir, 'check_version_updates.cjs'));
  263. await main();
  264. - name: Log runtime features
  265. if: ${{ contains(toJSON(vars), '"GH_AW_RUNTIME_FEATURES":') }}
  266. run: bash "${RUNNER_TEMP}/gh-aw/actions/log_runtime_features_summary.sh"
  267. - name: Create prompt with built-in context
  268. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  269. env:
  270. GH_AW_ACTIONS_DIR: ${{ runner.temp }}/gh-aw/actions
  271. GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
  272. GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl
  273. GH_AW_PROMPT_CONFIG: "{\"items\":[{\"content_env\":\"GH_AW_PROMPT_CONTENT_0000\"},{\"file\":\"xpia.md\"},{\"file\":\"temp_folder_prompt.md\"},{\"file\":\"markdown.md\"},{\"file\":\"safe_outputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0001\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0002\"},{\"file\":\"mcp_cli_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0003\"},{\"file\":\"github_mcp_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0004\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0005\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0006\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0007\"}]}"
  274. GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
  275. GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
  276. GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
  277. GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }}
  278. GH_AW_GITHUB_ACTOR: ${{ github.actor }}
  279. GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
  280. GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
  281. GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
  282. GH_AW_PROMPT_CONTENT_0000: "<system>\n"
  283. GH_AW_PROMPT_CONTENT_0001: "<safe-output-tools>\nTools: create_issue, missing_tool, missing_data, noop\n"
  284. GH_AW_PROMPT_CONTENT_0002: "</safe-output-tools>\n"
  285. GH_AW_PROMPT_CONTENT_0003: "<github-context>\nThe following GitHub context information is available for this workflow:\n{{#if github.actor}}\n- **actor**: __GH_AW_GITHUB_ACTOR__\n{{/if}}\n{{#if github.repository}}\n- **repository**: __GH_AW_GITHUB_REPOSITORY__\n{{/if}}\n{{#if github.workspace}}\n- **workspace**: __GH_AW_GITHUB_WORKSPACE__\n{{/if}}\n{{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}}\n- **issue-number**: #__GH_AW_EXPR_802A9F6A__\n{{/if}}\n{{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}}\n- **discussion-number**: #__GH_AW_EXPR_1A3A194A__\n{{/if}}\n{{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}}\n- **pull-request-number**: #__GH_AW_EXPR_463A214A__\n{{/if}}\n{{#if github.event.comment.id || github.aw.context.comment_id}}\n- **comment-id**: __GH_AW_EXPR_FF1D34CE__\n{{/if}}\n{{#if github.run_id}}\n- **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__\n{{/if}}\n</github-context>\n\n"
  286. GH_AW_PROMPT_CONTENT_0004: "</system>\n"
  287. GH_AW_PROMPT_CONTENT_0005: "{{#runtime-import .github/workflows/shared/engine.md}}\n"
  288. GH_AW_PROMPT_CONTENT_0006: "{{#runtime-import .github/workflows/shared/network.md}}\n"
  289. GH_AW_PROMPT_CONTENT_0007: "{{#runtime-import .github/workflows/weekly-report.md}}\n"
  290. with:
  291. script: |
  292. const { setupGlobals } = require(process.env.GH_AW_ACTIONS_DIR + '/setup_globals.cjs');
  293. setupGlobals(core, github, context, exec, io, getOctokit);
  294. const { main } = require(process.env.GH_AW_ACTIONS_DIR + '/create_prompt.cjs');
  295. await main(core);
  296. - name: Interpolate variables and render templates
  297. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  298. env:
  299. GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
  300. GH_AW_ENGINE_ID: "codex"
  301. with:
  302. script: |
  303. const path = require('path');
  304. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  305. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  306. setupGlobals(core, github, context, exec, io, getOctokit);
  307. const { main } = require(path.join(actionsDir, 'interpolate_prompt.cjs'));
  308. await main();
  309. - name: Substitute placeholders
  310. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  311. env:
  312. GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
  313. GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
  314. GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
  315. GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
  316. GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }}
  317. GH_AW_GITHUB_ACTOR: ${{ github.actor }}
  318. GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
  319. GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
  320. GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
  321. GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools'
  322. with:
  323. script: |
  324. const path = require('path');
  325. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  326. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  327. setupGlobals(core, github, context, exec, io, getOctokit);
  328. const substitutePlaceholders = require(path.join(actionsDir, 'substitute_placeholders.cjs'));
  329. // Call the substitution function
  330. return await substitutePlaceholders({
  331. file: process.env.GH_AW_PROMPT,
  332. substitutions: {
  333. GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A,
  334. GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A,
  335. GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A,
  336. GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE,
  337. GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR,
  338. GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
  339. GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
  340. GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
  341. GH_AW_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST
  342. }
  343. });
  344. - name: Validate prompt placeholders
  345. env:
  346. GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
  347. run: |
  348. bash "${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh"
  349. - name: Print prompt
  350. env:
  351. GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
  352. run: |
  353. bash "${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh"
  354. - name: Upload info artifact
  355. if: success() || failure()
  356. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  357. with:
  358. name: info
  359. path: /tmp/gh-aw/aw_info.json
  360. if-no-files-found: ignore
  361. - name: Stage prompt files for artifact upload
  362. run: |
  363. mkdir -p /tmp/gh-aw/aw-prompts
  364. cp -a "${RUNNER_TEMP}/gh-aw/aw-prompts/." /tmp/gh-aw/aw-prompts/
  365. - name: Upload activation artifact
  366. if: success() || failure()
  367. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  368. with:
  369. name: activation
  370. include-hidden-files: true
  371. path: |
  372. /tmp/gh-aw/aw_info.json
  373. /tmp/gh-aw/models.json
  374. /tmp/gh-aw/aw-prompts/prompt.txt
  375. /tmp/gh-aw/aw-prompts/prompt-template.txt
  376. /tmp/gh-aw/aw-prompts/prompt-import-tree.json
  377. /tmp/gh-aw/github_rate_limits.jsonl
  378. /tmp/gh-aw/base
  379. /tmp/gh-aw/.codex/agents
  380. /tmp/gh-aw/.codex/skills
  381. if-no-files-found: ignore
  382. retention-days: 1
  383. agent:
  384. needs: activation
  385. if: needs.activation.outputs.daily_ai_credits_exceeded != 'true'
  386. runs-on: ubuntu-latest
  387. permissions:
  388. contents: read
  389. discussions: read
  390. issues: read
  391. pull-requests: read
  392. concurrency:
  393. group: "gh-aw-codex-${{ github.workflow }}"
  394. queue: max
  395. timeout-minutes: 60
  396. env:
  397. DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
  398. GH_AW_ASSETS_ALLOWED_EXTS: ""
  399. GH_AW_ASSETS_BRANCH: ""
  400. GH_AW_ASSETS_MAX_SIZE_KB: 0
  401. GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
  402. GH_AW_PR_HEAD_BASE_BRANCH: ""
  403. GH_AW_PR_HEAD_BASE_PR_NUMBER: ""
  404. GH_AW_PR_HEAD_BASE_REF: ""
  405. GH_AW_PR_HEAD_BASE_REPO: ""
  406. GH_AW_PR_HEAD_BASE_SHA: ""
  407. GH_AW_PR_HEAD_REPO: ""
  408. GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
  409. GH_AW_WORKFLOW_ID_SANITIZED: weeklyreport
  410. outputs:
  411. agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }}
  412. ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
  413. aic: ${{ steps.parse-token-usage.outputs.aic }}
  414. ambient_context: ${{ steps.parse-token-usage.outputs.ambient_context }}
  415. checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }}
  416. has_patch: ${{ steps.collect_output.outputs.has_patch }}
  417. http_400_response_error: ${{ steps.detect-agent-errors.outputs.http_400_response_error || 'false' }}
  418. inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }}
  419. invocation_cap_exceeded: ${{ steps.detect-agent-errors.outputs.invocation_cap_exceeded || 'false' }}
  420. max_cache_misses_exceeded: ${{ steps.detect-agent-errors.outputs.max_cache_misses_exceeded || 'false' }}
  421. mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }}
  422. missing_model_pricing_error: ${{ steps.detect-agent-errors.outputs.missing_model_pricing_error || 'false' }}
  423. missing_model_pricing_model_name: ${{ steps.detect-agent-errors.outputs.missing_model_pricing_model_name || '' }}
  424. model: ${{ needs.activation.outputs.model }}
  425. model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }}
  426. output: ${{ steps.collect_output.outputs.output }}
  427. output_types: ${{ steps.collect_output.outputs.output_types }}
  428. setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
  429. setup-span-id: ${{ steps.setup.outputs.span-id }}
  430. setup-trace-id: ${{ steps.setup.outputs.trace-id }}
  431. shell_expansion_guard_rejected: ${{ steps.detect-agent-errors.outputs.shell_expansion_guard_rejected || 'false' }}
  432. unknown_model_ai_credits: ${{ steps.parse-mcp-gateway.outputs.unknown_model_ai_credits || 'false' }}
  433. steps:
  434. - name: Setup Scripts
  435. id: setup
  436. uses: github/gh-aw-actions/setup@924af5fdc64061cfbf66fb584c8b07e2ac230c60 # v0.89.21
  437. with:
  438. destination: ${{ runner.temp }}/gh-aw/actions
  439. job-name: ${{ github.job }}
  440. trace-id: ${{ needs.activation.outputs.setup-trace-id }}
  441. parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
  442. env:
  443. GH_AW_SETUP_WORKFLOW_NAME: "Weekly Report"
  444. GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/weekly-report.lock.yml@${{ github.ref }}
  445. GH_AW_INFO_VERSION: "0.154.0"
  446. GH_AW_INFO_AWF_VERSION: "v0.28.23"
  447. GH_AW_INFO_ENGINE_ID: "codex"
  448. - name: Set runtime paths
  449. id: set-runtime-paths
  450. env:
  451. GH_AW_RUNNER_TOOL_CACHE: ${{ runner.tool_cache }}
  452. run: | # zizmor: ignore[github-env] - runner.tool_cache is set by GitHub Actions, not user input.
  453. if [ -z "${RUNNER_TOOL_CACHE:-}" ]; then
  454. echo "RUNNER_TOOL_CACHE=${GH_AW_RUNNER_TOOL_CACHE}" >> "$GITHUB_ENV"
  455. fi
  456. {
  457. echo "GH_AW_SAFE_OUTPUTS=${RUNNER_TEMP}/gh-aw/safeoutputs/outputs.jsonl"
  458. echo "GH_AW_SAFE_OUTPUTS_CONFIG_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/config.json"
  459. echo "GH_AW_SAFE_OUTPUTS_TOOLS_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/tools.json"
  460. } >> "$GITHUB_OUTPUT"
  461. - name: Mask OTLP telemetry headers
  462. run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
  463. - name: Check OTLP telemetry configuration
  464. run: bash "${RUNNER_TEMP}/gh-aw/actions/check_otlp_default_credentials.sh"
  465. - name: Checkout repository
  466. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  467. with:
  468. persist-credentials: false
  469. - name: Initialize agent execution evidence
  470. run: |
  471. mkdir -p "/tmp/gh-aw"
  472. evidence_tmp="/tmp/gh-aw/agent_execution.json.tmp"
  473. printf '{"version":1,"component":"agent","run_id":%s,"run_attempt":%s,"state":"not_started"}\n' "$GITHUB_RUN_ID" "$GITHUB_RUN_ATTEMPT" > "$evidence_tmp"
  474. mv "$evidence_tmp" "/tmp/gh-aw/agent_execution.json"
  475. - name: Create gh-aw temp directory
  476. run: bash "${RUNNER_TEMP}/gh-aw/actions/create_gh_aw_tmp_dir.sh"
  477. - name: Configure gh CLI for GitHub Enterprise
  478. run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_gh_for_ghe.sh"
  479. env:
  480. GH_TOKEN: ${{ github.token }}
  481. - name: Download activation artifact
  482. uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  483. with:
  484. name: activation
  485. path: /tmp/gh-aw
  486. - name: Configure Git credentials
  487. env:
  488. GITHUB_REPOSITORY: ${{ github.repository }}
  489. GITHUB_SERVER_URL: ${{ github.server_url }}
  490. GITHUB_TOKEN: ${{ github.token }}
  491. run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh"
  492. - name: Checkout PR branch
  493. id: checkout-pr
  494. if: |
  495. github.event.pull_request || github.event.issue.pull_request || github.event_name == 'workflow_dispatch' && fromJSON(github.event.inputs.aw_context || '{}').item_type == 'pull_request'
  496. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  497. env:
  498. GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  499. with:
  500. github-token: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  501. script: |
  502. const path = require('path');
  503. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  504. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  505. setupGlobals(core, github, context, exec, io, getOctokit);
  506. const { main } = require(path.join(actionsDir, 'checkout_pr_branch.cjs'));
  507. await main();
  508. - name: Setup Node.js
  509. uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
  510. with:
  511. node-version: '24'
  512. package-manager-cache: false
  513. - name: Install Codex CLI
  514. run: npm install --ignore-scripts -g @openai/codex@0.154.0
  515. - name: Install AWF binary
  516. run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.28.23 --rootless
  517. - name: Determine automatic lockdown mode for GitHub MCP Server
  518. id: determine-automatic-lockdown
  519. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 (source v9)
  520. env:
  521. GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
  522. GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
  523. GH_AW_GITHUB_MIN_INTEGRITY: 'none'
  524. with:
  525. script: |
  526. const path = require('path');
  527. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  528. const determineAutomaticLockdown = require(path.join(actionsDir, 'determine_automatic_lockdown.cjs'));
  529. await determineAutomaticLockdown(github, context, core);
  530. - name: Parse integrity filter lists
  531. id: parse-guard-vars
  532. env:
  533. GH_AW_BLOCKED_USERS_VAR: ${{ vars.GH_AW_GITHUB_BLOCKED_USERS || '' }}
  534. GH_AW_TRUSTED_USERS_VAR: ${{ vars.GH_AW_GITHUB_TRUSTED_USERS || '' }}
  535. GH_AW_APPROVAL_LABELS_VAR: ${{ vars.GH_AW_GITHUB_APPROVAL_LABELS || '' }}
  536. run: bash "${RUNNER_TEMP}/gh-aw/actions/parse_guard_list.sh"
  537. - name: Restore agent config folders from base branch
  538. if: steps.checkout-pr.outcome == 'success'
  539. env:
  540. GH_AW_AGENT_FOLDERS: ".agents .codex .github"
  541. GH_AW_AGENT_FILES: "AGENTS.md"
  542. run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh"
  543. - name: Restore inline sub-agents from activation artifact
  544. env:
  545. GH_AW_SUB_AGENT_DIR: ".codex/agents"
  546. GH_AW_SUB_AGENT_EXT: ".md"
  547. run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh"
  548. - name: Restore inline skills from activation artifact
  549. env:
  550. GH_AW_SKILL_DIR: ".codex/skills"
  551. run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh"
  552. - name: Download container images
  553. run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.28.23@sha256:2c78aaba1c108e130e2d6d01e4f2cca334ea04c53e6f258913ac34173fe7e3b2 ghcr.io/github/gh-aw-firewall/api-proxy:0.28.23@sha256:c15c3d1208df10c5b588a3657be53742aa982ae0909d1eb1812525268794ca64 ghcr.io/github/gh-aw-firewall/squid:0.28.23@sha256:02ffc56dd40158223064ef03a78c2d9717473c93723b4e403d455ea6f0b09ae0 ghcr.io/github/gh-aw-mcpg:v0.4.25@sha256:9be0a86220e807a0ecc89e53d7453468f7a53fbc6b3d1efd2299025ffe01d086 ghcr.io/github/gh-aw-node@sha256:11c2c544876cdbaffefe0f7f1283b74838c209654b4934a78e23ed11f750490f ghcr.io/github/github-mcp-server:v1.12.2@sha256:508a0857ec762b1ab1cece29193345b501fab1dd9d1228a7b617062954cecac6
  554. - name: Prepare Safe Outputs Directories
  555. run: |
  556. mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
  557. mkdir -p /tmp/gh-aw/safeoutputs
  558. mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
  559. - name: Generate Safe Outputs Config
  560. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  561. env:
  562. GH_AW_FILE_ROOT: "${{ runner.temp }}/gh-aw"
  563. GH_AW_FILE_CONFIG: "{\"files\":[{\"path\":\"safeoutputs/config.json\",\"content_env\":\"GH_AW_SAFE_OUTPUTS_CONFIG\"}]}"
  564. GH_AW_SAFE_OUTPUTS_CONFIG: "{\"create_issue\":{\"close_older_issues\":true,\"expires\":720,\"labels\":[\"weekly-report\",\"report\"],\"max\":1,\"title_prefix\":\"Weekly Report: \"},\"create_report_incomplete_issue\":{},\"max_bot_mentions\":1,\"mentions\":{\"enabled\":false},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}"
  565. with:
  566. script: |
  567. const path = require('path');
  568. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  569. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  570. setupGlobals(core, github, context, exec, io, getOctokit);
  571. const { main } = require(path.join(actionsDir, 'create_files.cjs'));
  572. await main();
  573. - name: Generate Safe Outputs Tools
  574. env:
  575. GH_AW_TOOLS_META_JSON: |
  576. {
  577. "description_suffixes": {
  578. "create_issue": " CONSTRAINTS: Maximum 1 issue(s) can be created. Title will be prefixed with \"Weekly Report: \". Labels [\"weekly-report\" \"report\"] will be automatically added."
  579. },
  580. "repo_params": {},
  581. "dynamic_tools": []
  582. }
  583. GH_AW_VALIDATION_JSON: |
  584. {
  585. "create_issue": {
  586. "defaultMax": 1,
  587. "fields": {
  588. "blocked_by": {},
  589. "body": {
  590. "required": true,
  591. "type": "string",
  592. "sanitize": true,
  593. "maxLength": 65000,
  594. "minLength": 20
  595. },
  596. "fields": {
  597. "type": "array"
  598. },
  599. "labels": {
  600. "type": "array",
  601. "itemType": "string",
  602. "itemSanitize": true,
  603. "itemMaxLength": 128
  604. },
  605. "parent": {
  606. "issueOrPRNumber": true
  607. },
  608. "repo": {
  609. "type": "string",
  610. "maxLength": 256
  611. },
  612. "temporary_id": {
  613. "type": "string"
  614. },
  615. "title": {
  616. "required": true,
  617. "type": "string",
  618. "sanitize": true,
  619. "maxLength": 128
  620. }
  621. }
  622. },
  623. "mentions": {
  624. "enabled": false
  625. },
  626. "missing_data": {
  627. "defaultMax": 20,
  628. "fields": {
  629. "alternatives": {
  630. "type": "string",
  631. "sanitize": true,
  632. "maxLength": 256
  633. },
  634. "context": {
  635. "type": "string",
  636. "sanitize": true,
  637. "maxLength": 256
  638. },
  639. "data_type": {
  640. "type": "string",
  641. "sanitize": true,
  642. "maxLength": 128
  643. },
  644. "reason": {
  645. "type": "string",
  646. "sanitize": true,
  647. "maxLength": 256
  648. }
  649. }
  650. },
  651. "missing_tool": {
  652. "defaultMax": 20,
  653. "fields": {
  654. "alternatives": {
  655. "type": "string",
  656. "sanitize": true,
  657. "maxLength": 512
  658. },
  659. "reason": {
  660. "required": true,
  661. "type": "string",
  662. "sanitize": true,
  663. "maxLength": 256
  664. },
  665. "tool": {
  666. "type": "string",
  667. "sanitize": true,
  668. "maxLength": 128
  669. }
  670. }
  671. },
  672. "noop": {
  673. "defaultMax": 1,
  674. "fields": {
  675. "message": {
  676. "required": true,
  677. "type": "string",
  678. "sanitize": true,
  679. "maxLength": 65000
  680. }
  681. }
  682. },
  683. "report_incomplete": {
  684. "defaultMax": 5,
  685. "fields": {
  686. "details": {
  687. "type": "string",
  688. "sanitize": true,
  689. "maxLength": 65000
  690. },
  691. "reason": {
  692. "required": true,
  693. "type": "string",
  694. "sanitize": true,
  695. "maxLength": 1024
  696. }
  697. }
  698. }
  699. }
  700. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  701. with:
  702. script: |
  703. const path = require('path');
  704. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  705. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  706. setupGlobals(core, github, context, exec, io, getOctokit);
  707. const { main } = require(path.join(actionsDir, 'generate_safe_outputs_tools.cjs'));
  708. await main();
  709. - name: Start MCP Gateway
  710. id: start-mcp-gateway
  711. env:
  712. CODEX_HOME: /tmp/gh-aw/mcp-config
  713. GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST: ${{ vars.GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST || 'true' }}
  714. GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
  715. GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_CONFIG_PATH }}
  716. GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_TOOLS_PATH }}
  717. GH_AW_SINK_VISIBILITY: ${{ steps.determine-automatic-lockdown.outputs.visibility }}
  718. GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  719. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  720. run: |
  721. set -eo pipefail
  722. mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config"
  723. if [ -n "${GITHUB_EVENT_PATH:-}" ] && [ -r "${GITHUB_EVENT_PATH}" ]; then
  724. GH_AW_SAFEOUTPUTS_EVENT_PATH="${RUNNER_TEMP}/gh-aw/safeoutputs/github_event.json"
  725. cp "${GITHUB_EVENT_PATH}" "${GH_AW_SAFEOUTPUTS_EVENT_PATH}"
  726. export GITHUB_EVENT_PATH="${GH_AW_SAFEOUTPUTS_EVENT_PATH}"
  727. fi
  728. # Export gateway environment variables for MCP config and gateway script
  729. export MCP_GATEWAY_PORT="8080"
  730. export MCP_GATEWAY_DOMAIN="awmg-mcpg"
  731. export MCP_GATEWAY_HOST_DOMAIN="localhost"
  732. MCP_GATEWAY_AGENT_ID=$(openssl rand -base64 45 | tr -d '/+=')
  733. echo "::add-mask::${MCP_GATEWAY_AGENT_ID}"
  734. export MCP_GATEWAY_AGENT_ID
  735. export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads"
  736. mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}"
  737. export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288"
  738. export MCP_GATEWAY_ALLOWED_MOUNT_ROOTS="${GITHUB_WORKSPACE}:rw,${RUNNER_TEMP}/gh-aw:ro,${RUNNER_TEMP}/gh-aw/safeoutputs:rw,/opt:ro,/tmp:rw,/usr/bin/gh:ro"
  739. export GH_AW_PR_HEAD_BASE_BRANCH="${GH_AW_PR_HEAD_BASE_BRANCH:-}"
  740. export GH_AW_PR_HEAD_BASE_SHA="${GH_AW_PR_HEAD_BASE_SHA:-}"
  741. export GH_AW_PR_HEAD_BASE_REPO="${GH_AW_PR_HEAD_BASE_REPO:-}"
  742. export GH_AW_PR_HEAD_BASE_PR_NUMBER="${GH_AW_PR_HEAD_BASE_PR_NUMBER:-}"
  743. export GH_AW_PR_HEAD_BASE_REF="${GH_AW_PR_HEAD_BASE_REF:-}"
  744. export GH_AW_PR_HEAD_REPO="${GH_AW_PR_HEAD_REPO:-}"
  745. export DEBUG="*"
  746. export GH_AW_ENGINE="codex"
  747. MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0')
  748. MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0')
  749. source "${RUNNER_TEMP}/gh-aw/actions/resolve_docker_socket_gid.sh"
  750. export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network bridge -p 127.0.0.1:'"${MCP_GATEWAY_PORT}"':'"${MCP_GATEWAY_PORT}"' --name awmg-mcpg --add-host host.docker.internal:host-gateway --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_AGENT_ID -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_PR_HEAD_BASE_BRANCH -e GH_AW_PR_HEAD_BASE_SHA -e GH_AW_PR_HEAD_BASE_REPO -e GH_AW_PR_HEAD_BASE_PR_NUMBER -e GH_AW_PR_HEAD_BASE_REF -e GH_AW_PR_HEAD_REPO -e GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GH_AW_SINK_VISIBILITY -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e RUNNER_TEMP -e RUNNER_TOOL_CACHE -e MCP_GATEWAY_ALLOWED_MOUNT_ROOTS -e GITHUB_AW_OTEL_TRACE_ID -e GITHUB_AW_OTEL_PARENT_SPAN_ID -e OTEL_EXPORTER_OTLP_HEADERS -e CODEX_HOME -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw -v '"${RUNNER_TEMP}"'/gh-aw/safeoutputs:'"${RUNNER_TEMP}"'/gh-aw/safeoutputs:rw ghcr.io/github/gh-aw-mcpg:v0.4.25'
  751. cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_aad5e9411170a336_EOF
  752. [history]
  753. persistence = "none"
  754. [otel]
  755. metrics_exporter = "none"
  756. [shell_environment_policy]
  757. inherit = "core"
  758. include_only = ["^CODEX_API_KEY$", "^GH_AW_ASSETS_ALLOWED_EXTS$", "^GH_AW_ASSETS_BRANCH$", "^GH_AW_ASSETS_MAX_SIZE_KB$", "^GH_AW_SAFE_OUTPUTS$", "^GITHUB_PERSONAL_ACCESS_TOKEN$", "^GITHUB_REPOSITORY$", "^GITHUB_SERVER_URL$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"]
  759. [mcp_servers.github]
  760. user_agent = "weekly-report"
  761. startup_timeout_sec = 120
  762. tool_timeout_sec = 60
  763. container = "ghcr.io/github/github-mcp-server:v1.12.2"
  764. env = { "GITHUB_FEATURES" = "fields_param", "GITHUB_HOST" = "$GITHUB_SERVER_URL", "GITHUB_PERSONAL_ACCESS_TOKEN" = "$GH_AW_GITHUB_TOKEN", "GITHUB_READ_ONLY" = "1", "GITHUB_TOOLSETS" = "context,repos,issues,pull_requests" }
  765. env_vars = ["GITHUB_FEATURES", "GITHUB_HOST", "GITHUB_PERSONAL_ACCESS_TOKEN", "GITHUB_READ_ONLY", "GITHUB_TOOLSETS"]
  766. [mcp_servers.safeoutputs]
  767. container = "ghcr.io/github/gh-aw-node"
  768. mounts = ["\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw", "${RUNNER_TEMP}/gh-aw/safeoutputs:${RUNNER_TEMP}/gh-aw/safeoutputs:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"]
  769. args = ["-w", "$GITHUB_WORKSPACE"]
  770. entrypoint = "sh"
  771. entrypointArgs = ["-c", "sh ${RUNNER_TEMP}/gh-aw/safeoutputs/start_safe_outputs_mcp.sh"]
  772. env_vars = ["DEBUG", "DEFAULT_BRANCH", "GH_AW_ASSETS_ALLOWED_EXTS", "GH_AW_ASSETS_BRANCH", "GH_AW_ASSETS_MAX_SIZE_KB", "GH_AW_MCP_LOG_DIR", "GH_AW_SAFE_OUTPUTS", "GH_AW_SAFE_OUTPUTS_CONFIG_PATH", "GH_AW_SAFE_OUTPUTS_TOOLS_PATH", "GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST", "GH_AW_PR_HEAD_BASE_BRANCH", "GH_AW_PR_HEAD_BASE_SHA", "GH_AW_PR_HEAD_BASE_REPO", "GH_AW_PR_HEAD_BASE_PR_NUMBER", "GH_AW_PR_HEAD_BASE_REF", "GH_AW_PR_HEAD_REPO", "GITHUB_EVENT_NAME", "GITHUB_EVENT_PATH", "GITHUB_REPOSITORY", "GITHUB_SHA", "GITHUB_TOKEN", "GITHUB_WORKSPACE", "RUNNER_TEMP"]
  773. [mcp_servers.safeoutputs."guard-policies"]
  774. [mcp_servers.safeoutputs."guard-policies".write-sink]
  775. accept = ["*"]
  776. sink-visibility = "${GH_AW_SINK_VISIBILITY}"
  777. GH_AW_MCP_CONFIG_aad5e9411170a336_EOF
  778. # Generate JSON config for MCP gateway
  779. GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
  780. cat << GH_AW_MCP_CONFIG_f0a1fc3b3f0a0ba6_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
  781. {
  782. "mcpServers": {
  783. "github": {
  784. "container": "ghcr.io/github/github-mcp-server:v1.12.2",
  785. "env": {
  786. "GITHUB_FEATURES": "fields_param",
  787. "GITHUB_HOST": "$GITHUB_SERVER_URL",
  788. "GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_SERVER_TOKEN",
  789. "GITHUB_READ_ONLY": "1",
  790. "GITHUB_TOOLSETS": "context,repos,issues,pull_requests"
  791. },
  792. "guard-policies": {
  793. "allow-only": {
  794. "approval-labels": ${{ steps.parse-guard-vars.outputs.approval_labels }},
  795. "blocked-users": ${{ steps.parse-guard-vars.outputs.blocked_users }},
  796. "min-integrity": "none",
  797. "repos": "all",
  798. "trusted-users": ${{ steps.parse-guard-vars.outputs.trusted_users }}
  799. }
  800. }
  801. },
  802. "safeoutputs": {
  803. "container": "ghcr.io/github/gh-aw-node",
  804. "mounts": ["\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw", "${RUNNER_TEMP}/gh-aw/safeoutputs:${RUNNER_TEMP}/gh-aw/safeoutputs:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"],
  805. "args": ["-w", "\${GITHUB_WORKSPACE}"],
  806. "entrypoint": "sh",
  807. "entrypointArgs": ["-c", "sh ${RUNNER_TEMP}/gh-aw/safeoutputs/start_safe_outputs_mcp.sh"],
  808. "env": {
  809. "DEBUG": "*",
  810. "DEFAULT_BRANCH": "\${DEFAULT_BRANCH}",
  811. "GH_AW_ASSETS_ALLOWED_EXTS": "\${GH_AW_ASSETS_ALLOWED_EXTS}",
  812. "GH_AW_ASSETS_BRANCH": "\${GH_AW_ASSETS_BRANCH}",
  813. "GH_AW_ASSETS_MAX_SIZE_KB": "\${GH_AW_ASSETS_MAX_SIZE_KB}",
  814. "GH_AW_MCP_LOG_DIR": "\${GH_AW_MCP_LOG_DIR}",
  815. "GH_AW_SAFE_OUTPUTS": "\${GH_AW_SAFE_OUTPUTS}",
  816. "GH_AW_SAFE_OUTPUTS_CONFIG_PATH": "\${GH_AW_SAFE_OUTPUTS_CONFIG_PATH}",
  817. "GH_AW_SAFE_OUTPUTS_TOOLS_PATH": "\${GH_AW_SAFE_OUTPUTS_TOOLS_PATH}",
  818. "GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST": "\${GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST}",
  819. "GH_AW_PR_HEAD_BASE_BRANCH": "\${GH_AW_PR_HEAD_BASE_BRANCH}",
  820. "GH_AW_PR_HEAD_BASE_SHA": "\${GH_AW_PR_HEAD_BASE_SHA}",
  821. "GH_AW_PR_HEAD_BASE_REPO": "\${GH_AW_PR_HEAD_BASE_REPO}",
  822. "GH_AW_PR_HEAD_BASE_PR_NUMBER": "\${GH_AW_PR_HEAD_BASE_PR_NUMBER}",
  823. "GH_AW_PR_HEAD_BASE_REF": "\${GH_AW_PR_HEAD_BASE_REF}",
  824. "GH_AW_PR_HEAD_REPO": "\${GH_AW_PR_HEAD_REPO}",
  825. "GITHUB_EVENT_NAME": "\${GITHUB_EVENT_NAME}",
  826. "GITHUB_EVENT_PATH": "\${GITHUB_EVENT_PATH}",
  827. "GITHUB_REPOSITORY": "\${GITHUB_REPOSITORY}",
  828. "GITHUB_SHA": "\${GITHUB_SHA}",
  829. "GITHUB_TOKEN": "\${GITHUB_TOKEN}",
  830. "GITHUB_WORKSPACE": "\${GITHUB_WORKSPACE}",
  831. "RUNNER_TEMP": "\${RUNNER_TEMP}"
  832. },
  833. "guard-policies": {
  834. "write-sink": {
  835. "accept": [
  836. "*"
  837. ],
  838. "sink-visibility": "${GH_AW_SINK_VISIBILITY}"
  839. }
  840. }
  841. }
  842. },
  843. "gateway": {
  844. "port": $MCP_GATEWAY_PORT,
  845. "domain": "${MCP_GATEWAY_DOMAIN}",
  846. "agentId": "${MCP_GATEWAY_AGENT_ID}",
  847. "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}",
  848. "startupTimeout": 120,
  849. "opentelemetry": {
  850. "endpoint": "${OTEL_EXPORTER_OTLP_ENDPOINT}",
  851. "traceId": "${GITHUB_AW_OTEL_TRACE_ID}",
  852. "spanId": "${GITHUB_AW_OTEL_PARENT_SPAN_ID}"
  853. }
  854. }
  855. }
  856. GH_AW_MCP_CONFIG_f0a1fc3b3f0a0ba6_EOF
  857. # Sync converter output to writable CODEX_HOME for Codex
  858. mkdir -p /tmp/gh-aw/mcp-config
  859. cat > "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_SHELL_POLICY_1291c5e46fe06428_EOF
  860. model_provider = "openai-proxy"
  861. [model_providers.openai-proxy]
  862. name = "OpenAI AWF proxy"
  863. base_url = "http://172.30.0.30:10000"
  864. env_key = "CODEX_API_KEY"
  865. wire_api = "responses"
  866. requires_openai_auth = false
  867. supports_websockets = false
  868. [features]
  869. plugins = false
  870. [shell_environment_policy]
  871. inherit = "core"
  872. include_only = ["^CODEX_API_KEY$", "^GH_AW_ASSETS_ALLOWED_EXTS$", "^GH_AW_ASSETS_BRANCH$", "^GH_AW_ASSETS_MAX_SIZE_KB$", "^GH_AW_SAFE_OUTPUTS$", "^GITHUB_PERSONAL_ACCESS_TOKEN$", "^GITHUB_REPOSITORY$", "^GITHUB_SERVER_URL$", "^HOME$", "^OPENAI_API_KEY$", "^PATH$"]
  873. GH_AW_CODEX_SHELL_POLICY_1291c5e46fe06428_EOF
  874. awk '
  875. BEGIN { skip_openai_proxy = 0 }
  876. /^[[:space:]]*model_provider[[:space:]]*=/ { next }
  877. /^\[model_providers\.openai-proxy\][[:space:]]*$/ { skip_openai_proxy = 1; next }
  878. /^\[/ { skip_openai_proxy = 0 }
  879. !skip_openai_proxy { print }
  880. ' "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" >> "/tmp/gh-aw/mcp-config/config.toml"
  881. chmod 600 "/tmp/gh-aw/mcp-config/config.toml"
  882. mkdir -p "${CODEX_HOME}"
  883. if [ "/tmp/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "/tmp/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi
  884. chmod 600 "${CODEX_HOME}/config.toml"
  885. - name: Mount MCP servers as CLIs
  886. id: mount-mcp-clis
  887. continue-on-error: true
  888. env:
  889. MCP_GATEWAY_AGENT_ID: ${{ steps.start-mcp-gateway.outputs.gateway-agent-id }}
  890. MCP_GATEWAY_DOMAIN: ${{ steps.start-mcp-gateway.outputs.gateway-domain }}
  891. MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
  892. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  893. with:
  894. script: |
  895. const path = require('path');
  896. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  897. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  898. setupGlobals(core, github, context, exec, io);
  899. const { main } = require(path.join(actionsDir, 'mount_mcp_as_cli.cjs'));
  900. await main();
  901. - name: Clean credentials
  902. continue-on-error: true
  903. run: bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh"
  904. - name: Audit pre-agent workspace
  905. id: pre_agent_audit
  906. continue-on-error: true
  907. run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh"
  908. - name: Execute Codex CLI
  909. id: agentic_execution
  910. timeout-minutes: 20
  911. run: |
  912. set -o pipefail
  913. trap 'gh_aw_exit_code=$?; mkdir -p /tmp/gh-aw >/dev/null 2>&1 || true; printf "%s" "$gh_aw_exit_code" > /tmp/gh-aw/agent_execution_exit_code.txt || true; if [ "$gh_aw_exit_code" -ne 0 ]; then echo "::error::Agent execution exited with code $gh_aw_exit_code"; fi' EXIT
  914. printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt
  915. mkdir -p "$CODEX_HOME/logs" && touch /tmp/gh-aw/agent-step-summary.md
  916. (umask 177 && touch /tmp/gh-aw/agent-stdio.log)
  917. GH_AW_MAX_AI_CREDITS="${GH_AW_MAX_AI_CREDITS:-1000}"
  918. if [[ ! "$GH_AW_MAX_AI_CREDITS" =~ ^[0-9]+$ ]]; then
  919. GH_AW_MAX_AI_CREDITS="1000"
  920. fi
  921. printf '%s\n' "{\"\$schema\":\"https://github.com/github/gh-aw-firewall/releases/download/v0.28.23/awf-config.schema.json\",\"network\":{\"allowDomains\":[\"ai-pixel.online\",\"api-inference.modelscope.cn\",\"api.commandcode.ai\",\"api.deepseek.com\",\"api.minimaxi.com\",\"api.snapcraft.io\",\"archive.ubuntu.com\",\"azure.archive.ubuntu.com\",\"crl.geotrust.com\",\"crl.globalsign.com\",\"crl.identrust.com\",\"crl.sectigo.com\",\"crl.thawte.com\",\"crl.usertrust.com\",\"crl.verisign.com\",\"crl3.digicert.com\",\"crl4.digicert.com\",\"crls.ssl.com\",\"json-schema.org\",\"json.schemastore.org\",\"keyserver.ubuntu.com\",\"ocsp.digicert.com\",\"ocsp.geotrust.com\",\"ocsp.globalsign.com\",\"ocsp.identrust.com\",\"ocsp.sectigo.com\",\"ocsp.ssl.com\",\"ocsp.thawte.com\",\"ocsp.usertrust.com\",\"ocsp.verisign.com\",\"open.bigmodel.cn\",\"opencode.ai\",\"packagecloud.io\",\"packages.cloud.google.com\",\"packages.microsoft.com\",\"ppa.launchpad.net\",\"s.symcb.com\",\"s.symcd.com\",\"security.ubuntu.com\",\"ts-crl.ws.symantec.com\",\"ts-ocsp.ws.symantec.com\",\"www.googleapis.com\"],\"isolation\":true,\"topologyAttach\":[\"awmg-mcpg\"]},\"apiProxy\":{\"enabled\":true,\"enableTokenSteering\":true,\"maxRuns\":500,\"maxAiCredits\":${GH_AW_MAX_AI_CREDITS},\"maxCacheMisses\":5,\"modelFallback\":{\"enabled\":false},\"targets\":{\"openai\":{\"host\":\"ai-pixel.online\"}},\"models\":{\"agent\":[\"sonnet-6x\",\"gpt-6\",\"gpt-5.4\",\"gpt-5.5\",\"gpt-5.6\",\"gpt-5.3\",\"gemini-pro\",\"any\"],\"antigravity\":[\"copilot/antigravity*\",\"google/antigravity*\",\"gemini/antigravity*\"],\"any\":[\"copilot/*\",\"anthropic/*\",\"openai/*\",\"google/*\",\"gemini/*\"],\"auto\":[\"copilot/auto\",\"large\"],\"claude\":[\"agent\"],\"codex\":[\"agent\"],\"coding\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\",\"gpt-5-codex\",\"kimi\"],\"computer-use\":[\"copilot/*computer-use*\",\"google/*computer-use*\",\"gemini/*computer-use*\",\"openai/*computer-use*\"],\"copilot\":[\"agent\"],\"deep-research\":[\"copilot/deep-research*\",\"copilot/o3-deep-research*\",\"copilot/o4-mini-deep-research*\",\"google/deep-research*\",\"gemini/deep-research*\",\"openai/o3-deep-research*\",\"openai/o4-mini-deep-research*\"],\"detection\":[\"small\"],\"evals\":[\"small\"],\"fable\":[\"copilot/*fable*\",\"anthropic/*fable*\"],\"gemini\":[\"agent\"],\"gemini-3-flash\":[\"copilot/gemini-3*flash*\",\"google/gemini-3*flash*\",\"gemini/gemini-3*flash*\"],\"gemini-3-pro\":[\"copilot/gemini-3*pro*\",\"google/gemini-3*pro*\",\"google/nano-banana*\",\"gemini/gemini-3*pro*\"],\"gemini-3.1-flash\":[\"copilot/gemini-3.1*flash*\",\"google/gemini-3.1*flash*\",\"gemini/gemini-3.1*flash*\"],\"gemini-3.1-pro\":[\"copilot/gemini-3.1*pro*\",\"google/gemini-3.1*pro*\",\"gemini/gemini-3.1*pro*\"],\"gemini-3.5-flash\":[\"copilot/gemini-3.5*flash*\",\"google/gemini-3.5*flash*\",\"gemini/gemini-3.5*flash*\"],\"gemini-3.6-flash\":[\"copilot/gemini-3.6*flash*\",\"google/gemini-3.6*flash*\",\"gemini/gemini-3.6*flash*\"],\"gemini-3.7-flash\":[\"copilot/gemini-3.7*flash*\",\"google/gemini-3.7*flash*\",\"gemini/gemini-3.7*flash*\"],\"gemini-3.8-flash\":[\"copilot/gemini-3.8*flash*\",\"google/gemini-3.8*flash*\",\"gemini/gemini-3.8*flash*\"],\"gemini-flash\":[\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"],\"gemini-flash-lite\":[\"copilot/gemini-*flash*lite*\",\"google/gemini-*flash*lite*\",\"gemini/gemini-*flash*lite*\"],\"gemini-omni\":[\"copilot/gemini-omni*\",\"google/gemini-omni*\",\"gemini/gemini-omni*\"],\"gemini-pro\":[\"copilot/gemini-*pro*\",\"google/gemini-*pro*\",\"gemini/gemini-*pro*\"],\"gemma\":[\"copilot/gemma*\",\"google/gemma*\",\"gemini/gemma*\"],\"gpt-5\":[\"copilot/gpt-5*\",\"openai/gpt-5*\"],\"gpt-5-codex\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\"],\"gpt-5-mini\":[\"copilot/gpt-5*mini*\",\"openai/gpt-5*mini*\"],\"gpt-5-nano\":[\"copilot/gpt-5*nano*\",\"openai/gpt-5*nano*\"],\"gpt-5-pro\":[\"copilot/gpt-5*pro*\",\"openai/gpt-5*pro*\"],\"gpt-5.1\":[\"copilot/gpt-5.1*\",\"openai/gpt-5.1*\"],\"gpt-5.2\":[\"copilot/gpt-5.2*\",\"openai/gpt-5.2*\"],\"gpt-5.3\":[\"copilot/gpt-5.3*\",\"openai/gpt-5.3*\"],\"gpt-5.4\":[\"copilot/gpt-5.4*\",\"openai/gpt-5.4*\"],\"gpt-5.5\":[\"copilot/gpt-5.5*\",\"openai/gpt-5.5*\"],\"gpt-5.6\":[\"copilot/gpt-5.6*\",\"openai/gpt-5.6*\"],\"gpt-6\":[\"copilot/gpt-6*\",\"openai/gpt-6*\"],\"grok\":[\"copilot/*grok*\",\"openai/*grok*\"],\"haiku\":[\"copilot/*haiku*\",\"anthropic/*haiku*\"],\"image-generation\":[\"copilot/gpt-image*\",\"openai/gpt-image*\",\"openai/chatgpt-image*\",\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"google/imagen*\"],\"kimi\":[\"copilot/kimi*\",\"openai/kimi*\"],\"kiwi\":[\"copilot/kiwi*\",\"openai/kiwi*\"],\"large\":[\"sonnet\",\"gpt-6\",\"gpt-5-pro\",\"gpt-5\",\"gemini-pro\"],\"lyria\":[\"google/lyria*\",\"gemini/lyria*\",\"copilot/lyria*\"],\"mai-code\":[\"copilot/MAI-Code*\",\"copilot/mai-code*\",\"openai/MAI-Code*\"],\"mai-code-1-flash-picker\":[\"copilot/MAI-Code-1-Flash-picker*\",\"copilot/mai-code-1-flash-picker*\",\"openai/MAI-Code-1-Flash-picker*\"],\"mini\":[\"haiku\",\"gpt-5-mini\",\"gpt-5-nano\",\"gemini-flash-lite\"],\"nano-banana\":[\"copilot/nano-banana*\",\"google/nano-banana*\",\"gemini/nano-banana*\"],\"opus\":[\"copilot/*opus*\",\"anthropic/*opus*\"],\"opusplan\":[\"opus?effort=high\"],\"raptor-mini\":[\"copilot/raptor*\",\"openai/raptor*\"],\"reasoning\":[\"copilot/o1*\",\"copilot/o3*\",\"copilot/o4*\",\"openai/o1*\",\"openai/o3*\",\"openai/o4*\"],\"robotics\":[\"copilot/*robotics*\",\"google/*robotics*\",\"gemini/*robotics*\"],\"small\":[\"mini\"],\"small-agent\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash\"],\"sonnet\":[\"copilot/*sonnet*\",\"anthropic/*sonnet*\"],\"sonnet-6x\":[\"copilot/*sonnet-4.5*\",\"copilot/*sonnet-4.6*\",\"copilot/*sonnet-5*\",\"copilot/*sonnet-4-5-*\",\"anthropic/*sonnet-4-5-*\",\"copilot/*sonnet-4-6*\",\"anthropic/*sonnet-4-6*\",\"anthropic/*sonnet-5*\"],\"summarization\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash-lite\",\"mini\"],\"veo\":[\"google/veo*\",\"gemini/veo*\"],\"vision\":[\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"]}},\"container\":{\"imageTag\":\"0.28.23,squid=sha256:02ffc56dd40158223064ef03a78c2d9717473c93723b4e403d455ea6f0b09ae0,agent=sha256:2c78aaba1c108e130e2d6d01e4f2cca334ea04c53e6f258913ac34173fe7e3b2,api-proxy=sha256:c15c3d1208df10c5b588a3657be53742aa982ae0909d1eb1812525268794ca64,cli-proxy=sha256:9e31a6e518eba44652b9ae94ce55c3b6958e06290c3b81b08de4174751bb439a\"},\"logging\":{\"proxyLogsDir\":\"/tmp/gh-aw/sandbox/firewall/logs\",\"auditDir\":\"/tmp/gh-aw/sandbox/firewall/audit\"}}" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
  922. cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json
  923. export GH_AW_MODELS_JSON_PATH="/tmp/gh-aw/models.json"
  924. GH_AW_DOCKER_HOST=""
  925. if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
  926. GH_AW_DOCKER_HOST="${DOCKER_HOST}"
  927. fi
  928. if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
  929. GH_AW_CHROOT_BINARIES_SOURCE_PATH="${RUNNER_TEMP}/gh-aw" GH_AW_CHROOT_IDENTITY_HOME="${RUNNER_TEMP}/gh-aw/home" node "${RUNNER_TEMP}/gh-aw/actions/patch_awf_chroot_config.cjs"
  930. fi
  931. GH_AW_TOOL_CACHE_MOUNT=""
  932. GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"
  933. if [ -d "$GH_AW_TOOL_CACHE" ]; then
  934. if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then
  935. GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
  936. fi
  937. fi
  938. # shellcheck disable=SC1003,SC2016,SC2086
  939. mkdir -p "/tmp/gh-aw"
  940. evidence_tmp="/tmp/gh-aw/agent_execution.json.tmp"
  941. printf '{"version":1,"component":"agent","run_id":%s,"run_attempt":%s,"state":"started"}\n' "$GITHUB_RUN_ID" "$GITHUB_RUN_ATTEMPT" > "$evidence_tmp"
  942. mv "$evidence_tmp" "/tmp/gh-aw/agent_execution.json"
  943. export GH_AW_AWF_EXECUTION_COMPONENT="agent"
  944. export GH_AW_AWF_EXECUTION_EVIDENCE_FILE="/tmp/gh-aw/agent_execution.json"
  945. GH_AW_AWF_ENGINE_NAME=codex \
  946. GH_AW_AWF_HARNESS_MARKER='[codex-harness]' \
  947. GH_AW_AWF_LOG_FILE=/tmp/gh-aw/agent-stdio.log \
  948. GH_AW_AWF_ATTEMPT_LOG_NAME=codex \
  949. bash "${RUNNER_TEMP}/gh-aw/actions/run_awf_with_startup_retries.sh" -- \
  950. awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env ACTIONS_ID_TOKEN_REQUEST_TOKEN --exclude-env ACTIONS_ID_TOKEN_REQUEST_URL --exclude-env CODEX_API_KEY --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_AGENT_ID --exclude-env OPENAI_API_KEY --mount /tmp/gh-aw:/tmp/gh-aw:rw --log-level info --skip-pull \
  951. -- /bin/bash -c 'set +o histexpand; export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; GH_AW_TOOL_BINS="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')"; GH_AW_TOOL_BINS="${GH_AW_TOOL_BINS%:}"; export PATH="$PATH${GH_AW_TOOL_BINS:+:}$GH_AW_TOOL_BINS"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/codex_harness.cjs codex exec${GH_AW_MODEL_AGENT_CODEX:+ --model "$GH_AW_MODEL_AGENT_CODEX"} -c web_search="disabled" -c fetch="disabled" --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt'
  952. env:
  953. AWF_REFLECT_ENABLED: 1
  954. CODEX_API_KEY: ${{ secrets.CODEX_API_KEY || secrets.OPENAI_API_KEY }}
  955. CODEX_HOME: /tmp/gh-aw/mcp-config
  956. GH_AW_LLM_PROVIDER: openai
  957. GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_AI_CREDITS || '1000' }}
  958. GH_AW_MAX_TURNS: ${{ vars.GH_AW_DEFAULT_MAX_TURNS || '' }}
  959. GH_AW_MCP_CONFIG: ${{ runner.temp }}/gh-aw/mcp-config/config.toml
  960. GH_AW_MODEL_AGENT_CODEX: gpt-5.6-luna
  961. GH_AW_PHASE: agent
  962. GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
  963. GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
  964. GH_AW_VERSION: v0.89.21
  965. GITHUB_AW: true
  966. GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
  967. GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
  968. GIT_AUTHOR_NAME: github-actions[bot]
  969. GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
  970. GIT_COMMITTER_NAME: github-actions[bot]
  971. OPENAI_API_KEY: ${{ secrets.PIXEL_API_KEY }}
  972. OPENAI_BASE_URL: https://ai-pixel.online
  973. RUNNER_TEMP: ${{ runner.temp }}
  974. RUST_LOG: ${{ runner.debug == 1 && 'trace,hyper_util=info,mio=info,reqwest=info,os_info=info,codex_otel=warn,codex_core=debug,codex_exec=debug' || 'warn' }}
  975. TRACEPARENT: ${{ env.GITHUB_AW_OTEL_TRACE_ID != '' && env.GITHUB_AW_OTEL_PARENT_SPAN_ID != '' && format('00-{0}-{1}-01', env.GITHUB_AW_OTEL_TRACE_ID, env.GITHUB_AW_OTEL_PARENT_SPAN_ID) || '' }}
  976. - name: Detect agent errors
  977. if: always()
  978. id: detect-agent-errors
  979. continue-on-error: true
  980. env:
  981. GH_AW_AGENTIC_EXECUTION_OUTCOME: ${{ steps.agentic_execution.outcome }}
  982. GH_AW_ENGINE_STEP_TIMEOUT_MINUTES: 20
  983. GH_AW_ENGINE_INTERNAL_LOGS_DIR: /tmp/gh-aw/mcp-config/logs
  984. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  985. with:
  986. script: |
  987. const path = require('path');
  988. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  989. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  990. setupGlobals(core, github, context, exec, io, getOctokit);
  991. const { main } = require(path.join(actionsDir, 'detect_agent_errors.cjs'));
  992. await main();
  993. - name: Configure Git credentials
  994. env:
  995. GITHUB_REPOSITORY: ${{ github.repository }}
  996. GITHUB_SERVER_URL: ${{ github.server_url }}
  997. GITHUB_TOKEN: ${{ github.token }}
  998. run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh"
  999. - name: Stop MCP Gateway
  1000. if: always()
  1001. continue-on-error: true
  1002. env:
  1003. MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
  1004. MCP_GATEWAY_AGENT_ID: ${{ steps.start-mcp-gateway.outputs.gateway-agent-id }}
  1005. GATEWAY_PID: ${{ steps.start-mcp-gateway.outputs.gateway-pid }}
  1006. run: |
  1007. bash "${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh" "$GATEWAY_PID"
  1008. - name: Redact secrets in logs
  1009. if: always()
  1010. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1011. with:
  1012. script: |
  1013. const path = require('path');
  1014. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1015. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1016. setupGlobals(core, github, context, exec, io, getOctokit);
  1017. const { main } = require(path.join(actionsDir, 'redact_secrets.cjs'));
  1018. await main();
  1019. env:
  1020. GH_AW_SECRET_NAMES: 'CODEX_API_KEY,GH_AW_GITHUB_MCP_SERVER_TOKEN,GH_AW_GITHUB_TOKEN,GITHUB_TOKEN,OPENAI_API_KEY,PIXEL_API_KEY'
  1021. SECRET_CODEX_API_KEY: ${{ secrets.CODEX_API_KEY }}
  1022. SECRET_GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
  1023. SECRET_GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
  1024. SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  1025. SECRET_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
  1026. SECRET_PIXEL_API_KEY: ${{ secrets.PIXEL_API_KEY }}
  1027. - name: Append agent step summary
  1028. if: always()
  1029. run: bash "${RUNNER_TEMP}/gh-aw/actions/append_agent_step_summary.sh"
  1030. - name: Copy Safe Outputs
  1031. if: always()
  1032. env:
  1033. GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
  1034. run: |
  1035. mkdir -p /tmp/gh-aw
  1036. cp "$GH_AW_SAFE_OUTPUTS" /tmp/gh-aw/safeoutputs.jsonl 2>/dev/null || true
  1037. - name: Ingest agent output
  1038. id: collect_output
  1039. if: always()
  1040. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1041. env:
  1042. GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
  1043. GH_AW_ALLOWED_DOMAINS: "ai-pixel.online,api-inference.modelscope.cn,api.commandcode.ai,api.deepseek.com,api.minimaxi.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,open.bigmodel.cn,opencode.ai,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,s.symcb.com,s.symcd.com,security.ubuntu.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
  1044. GH_AW_ALLOWED_GITHUB_REFS: ""
  1045. GITHUB_SERVER_URL: ${{ github.server_url }}
  1046. GITHUB_API_URL: ${{ github.api_url }}
  1047. with:
  1048. script: |
  1049. const path = require('path');
  1050. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1051. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1052. setupGlobals(core, github, context, exec, io, getOctokit);
  1053. const { main } = require(path.join(actionsDir, 'collect_ndjson_output.cjs'));
  1054. await main();
  1055. - name: Parse agent logs for step summary
  1056. if: always()
  1057. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1058. env:
  1059. GH_AW_AGENT_OUTPUT: /tmp/gh-aw/agent-stdio.log
  1060. GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
  1061. with:
  1062. script: |
  1063. const path = require('path');
  1064. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1065. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1066. setupGlobals(core, github, context, exec, io, getOctokit);
  1067. const { main } = require(path.join(actionsDir, 'parse_codex_log.cjs'));
  1068. await main();
  1069. - name: Parse MCP Gateway logs for step summary
  1070. if: always()
  1071. id: parse-mcp-gateway
  1072. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1073. with:
  1074. script: |
  1075. const path = require('path');
  1076. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1077. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1078. setupGlobals(core, github, context, exec, io, getOctokit);
  1079. const { main } = require(path.join(actionsDir, 'parse_mcp_gateway_log.cjs'));
  1080. await main();
  1081. - name: Print firewall logs
  1082. if: always()
  1083. continue-on-error: true
  1084. env:
  1085. AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs
  1086. run: bash "${RUNNER_TEMP}/gh-aw/actions/print_firewall_logs.sh" --rootless
  1087. - name: Parse token usage for step summary
  1088. if: always()
  1089. id: parse-token-usage
  1090. continue-on-error: true
  1091. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1092. with:
  1093. script: |
  1094. const path = require('path');
  1095. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1096. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1097. setupGlobals(core, github, context, exec, io, getOctokit);
  1098. const { main } = require(path.join(actionsDir, 'parse_token_usage.cjs'));
  1099. await main();
  1100. - name: Print AWF reflect summary
  1101. if: always()
  1102. continue-on-error: true
  1103. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1104. with:
  1105. script: |
  1106. const path = require('path');
  1107. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1108. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1109. setupGlobals(core, github, context, exec, io, getOctokit);
  1110. const { main } = require(path.join(actionsDir, 'awf_reflect_summary.cjs'));
  1111. await main();
  1112. - name: Generate observability summary
  1113. if: always()
  1114. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1115. with:
  1116. script: |
  1117. const path = require('path');
  1118. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1119. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1120. setupGlobals(core, github, context, exec, io, getOctokit);
  1121. const { main } = require(path.join(actionsDir, 'generate_observability_summary.cjs'));
  1122. await main(core);
  1123. - name: Write agent output placeholder if missing
  1124. if: always()
  1125. run: |
  1126. if [ ! -f /tmp/gh-aw/agent_output.json ]; then
  1127. echo '{"items":[]}' > /tmp/gh-aw/agent_output.json
  1128. fi
  1129. # Small dedicated copy of the agent output so safe-output processing
  1130. # survives a failed or timed-out upload of the larger agent artifact
  1131. - name: Upload agent output fallback artifact
  1132. if: always()
  1133. continue-on-error: true
  1134. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  1135. with:
  1136. name: agent-output-fallback
  1137. path: |
  1138. /tmp/gh-aw/agent_output.json
  1139. /tmp/gh-aw/safeoutputs.jsonl
  1140. /tmp/gh-aw/agent_execution.json
  1141. /tmp/gh-aw/agent_usage.jsonl
  1142. /tmp/gh-aw/agent_usage.json
  1143. /tmp/gh-aw/sandbox/firewall-audit-logs/api-proxy-logs/token-usage.jsonl
  1144. /tmp/gh-aw/sandbox/firewall/logs/api-proxy-logs/token-usage.jsonl
  1145. /tmp/gh-aw/sandbox/firewall/audit/api-proxy-logs/token-usage.jsonl
  1146. if-no-files-found: ignore
  1147. - name: Upload agent artifacts
  1148. if: always()
  1149. continue-on-error: true
  1150. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  1151. with:
  1152. name: agent
  1153. path: |
  1154. /tmp/gh-aw/aw-prompts/prompt.txt
  1155. /tmp/gh-aw/agent_execution.json
  1156. /tmp/gh-aw/mcp-config/logs/
  1157. /tmp/gh-aw/redacted-urls.log
  1158. /tmp/gh-aw/mcp-logs/
  1159. /tmp/gh-aw/proxy-logs/
  1160. !/tmp/gh-aw/proxy-logs/proxy-tls/
  1161. /tmp/gh-aw/agent_usage.json
  1162. /tmp/gh-aw/agent-stdio.log
  1163. /tmp/gh-aw/pre-agent-audit.txt
  1164. /tmp/gh-aw/github_rate_limits.jsonl
  1165. /tmp/gh-aw/otel.jsonl
  1166. /tmp/gh-aw/otlp-export-errors.jsonl
  1167. /tmp/gh-aw/safeoutputs.jsonl
  1168. /tmp/gh-aw/agent_output.json
  1169. /tmp/gh-aw/aw-*.patch
  1170. /tmp/gh-aw/aw-*.bundle
  1171. /tmp/gh-aw/awf-config.json
  1172. /tmp/gh-aw/sandbox/firewall/logs/
  1173. /tmp/gh-aw/sandbox/firewall/audit/
  1174. /tmp/gh-aw/sandbox/firewall/awf-reflect.json
  1175. if-no-files-found: ignore
  1176. conclusion:
  1177. needs:
  1178. - activation
  1179. - agent
  1180. - detection
  1181. - safe_outputs
  1182. if: >
  1183. always() && (needs.agent.result != 'skipped' || needs.activation.outputs.lockdown_check_failed == 'true' ||
  1184. needs.activation.outputs.oauth_token_check_failed == 'true' || needs.activation.outputs.stale_lock_file_failed == 'true' ||
  1185. needs.activation.outputs.secret_verification_result == 'failed' || needs.activation.outputs.daily_ai_credits_exceeded == 'true' ||
  1186. needs.activation.outputs.daily_ai_credits_guardrail_status == 'structural_error' || needs.activation.outputs.daily_ai_credits_guardrail_status == 'transient_error')
  1187. runs-on: ubuntu-slim
  1188. permissions:
  1189. actions: read
  1190. issues: write
  1191. concurrency:
  1192. group: "gh-aw-conclusion-weekly-report"
  1193. cancel-in-progress: false
  1194. queue: max
  1195. env:
  1196. GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
  1197. outputs:
  1198. incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }}
  1199. noop_message: ${{ steps.noop.outputs.noop_message }}
  1200. tools_reported: ${{ steps.missing_tool.outputs.tools_reported }}
  1201. total_count: ${{ steps.missing_tool.outputs.total_count }}
  1202. steps:
  1203. - name: Setup Scripts
  1204. id: setup
  1205. uses: github/gh-aw-actions/setup@924af5fdc64061cfbf66fb584c8b07e2ac230c60 # v0.89.21
  1206. with:
  1207. destination: ${{ runner.temp }}/gh-aw/actions
  1208. job-name: ${{ github.job }}
  1209. trace-id: ${{ needs.activation.outputs.setup-trace-id }}
  1210. parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
  1211. env:
  1212. GH_AW_SETUP_WORKFLOW_NAME: "Weekly Report"
  1213. GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/weekly-report.lock.yml@${{ github.ref }}
  1214. GH_AW_INFO_VERSION: "0.154.0"
  1215. GH_AW_INFO_AWF_VERSION: "v0.28.23"
  1216. GH_AW_INFO_ENGINE_ID: "codex"
  1217. - name: Download agent output artifact
  1218. id: download-agent-output
  1219. continue-on-error: true
  1220. uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  1221. with:
  1222. pattern: "{agent,agent-output-fallback}"
  1223. merge-multiple: true
  1224. path: /tmp/gh-aw/
  1225. - name: Setup agent output environment variable
  1226. id: setup-agent-output-env
  1227. if: steps.download-agent-output.outcome == 'success'
  1228. run: |
  1229. mkdir -p /tmp/gh-aw/
  1230. find "/tmp/gh-aw/" -type f -print
  1231. if [ -f "/tmp/gh-aw/agent_output.json" ]; then
  1232. echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
  1233. fi
  1234. - name: Download detection artifact
  1235. id: download-detection-artifact
  1236. continue-on-error: true
  1237. uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  1238. with:
  1239. name: detection
  1240. path: /tmp/gh-aw/threat-detection/
  1241. - name: Download Safe Outputs Items Manifest
  1242. id: download-safe-outputs-manifest
  1243. if: always()
  1244. continue-on-error: true
  1245. uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  1246. with:
  1247. pattern: safe-outputs-items
  1248. merge-multiple: true
  1249. path: /tmp/gh-aw/
  1250. - name: Collect usage artifact files
  1251. if: always()
  1252. continue-on-error: true
  1253. run: bash "${RUNNER_TEMP}/gh-aw/actions/collect_usage_artifact_files.sh"
  1254. - name: Upload usage artifact
  1255. id: upload-usage-artifact
  1256. if: always()
  1257. continue-on-error: true
  1258. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  1259. with:
  1260. name: usage
  1261. path: |
  1262. /tmp/gh-aw/usage/aw_info.json
  1263. /tmp/gh-aw/usage/aw-info.jsonl
  1264. /tmp/gh-aw/usage/agent_usage.json
  1265. /tmp/gh-aw/usage/agent_usage.jsonl
  1266. /tmp/gh-aw/usage/detection_usage.jsonl
  1267. /tmp/gh-aw/usage/evals.jsonl
  1268. /tmp/gh-aw/usage/graders/grader_manifest.json
  1269. /tmp/gh-aw/usage/graders/grader_results.json
  1270. /tmp/gh-aw/usage/github_rate_limits.jsonl
  1271. /tmp/gh-aw/usage/agent/token_usage.jsonl
  1272. /tmp/gh-aw/usage/agent/execution.json
  1273. /tmp/gh-aw/usage/detection/token_usage.jsonl
  1274. /tmp/gh-aw/usage/detection/execution.json
  1275. /tmp/gh-aw/usage/evals/token_usage.jsonl
  1276. /tmp/gh-aw/usage/evals/execution.json
  1277. /tmp/gh-aw/usage/activity/summary.json
  1278. if-no-files-found: ignore
  1279. - name: Wait before retrying usage artifact upload
  1280. if: always() && steps.upload-usage-artifact.outcome == 'failure'
  1281. run: sleep 10
  1282. - name: Retry upload usage artifact
  1283. id: upload-usage-artifact-retry
  1284. if: always() && steps.upload-usage-artifact.outcome == 'failure'
  1285. continue-on-error: true
  1286. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  1287. with:
  1288. name: usage
  1289. path: |
  1290. /tmp/gh-aw/usage/aw_info.json
  1291. /tmp/gh-aw/usage/aw-info.jsonl
  1292. /tmp/gh-aw/usage/agent_usage.json
  1293. /tmp/gh-aw/usage/agent_usage.jsonl
  1294. /tmp/gh-aw/usage/detection_usage.jsonl
  1295. /tmp/gh-aw/usage/evals.jsonl
  1296. /tmp/gh-aw/usage/graders/grader_manifest.json
  1297. /tmp/gh-aw/usage/graders/grader_results.json
  1298. /tmp/gh-aw/usage/github_rate_limits.jsonl
  1299. /tmp/gh-aw/usage/agent/token_usage.jsonl
  1300. /tmp/gh-aw/usage/agent/execution.json
  1301. /tmp/gh-aw/usage/detection/token_usage.jsonl
  1302. /tmp/gh-aw/usage/detection/execution.json
  1303. /tmp/gh-aw/usage/evals/token_usage.jsonl
  1304. /tmp/gh-aw/usage/evals/execution.json
  1305. /tmp/gh-aw/usage/activity/summary.json
  1306. if-no-files-found: ignore
  1307. overwrite: true
  1308. - name: Process no-op messages
  1309. id: noop
  1310. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1311. env:
  1312. GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
  1313. GH_AW_NOOP_MAX: "1"
  1314. GH_AW_WORKFLOW_NAME: "Weekly Report"
  1315. GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/weekly-report.md"
  1316. GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  1317. GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
  1318. GH_AW_NOOP_REPORT_AS_ISSUE: "false"
  1319. GH_AW_AIC: ${{ needs.agent.outputs.aic }}
  1320. GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
  1321. GH_AW_AMBIENT_CONTEXT: ${{ needs.agent.outputs.ambient_context }}
  1322. GH_AW_WORKFLOW_ID: "weekly-report"
  1323. with:
  1324. github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  1325. script: |
  1326. const path = require('path');
  1327. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1328. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1329. setupGlobals(core, github, context, exec, io, getOctokit);
  1330. const { main } = require(path.join(actionsDir, 'handle_noop_message.cjs'));
  1331. await main();
  1332. - name: Log detection run
  1333. id: detection_runs
  1334. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1335. env:
  1336. GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
  1337. GH_AW_WORKFLOW_NAME: "Weekly Report"
  1338. GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/weekly-report.md"
  1339. GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  1340. GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }}
  1341. GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }}
  1342. with:
  1343. github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  1344. script: |
  1345. const path = require('path');
  1346. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1347. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1348. setupGlobals(core, github, context, exec, io, getOctokit);
  1349. const { main } = require(path.join(actionsDir, 'handle_detection_runs.cjs'));
  1350. await main();
  1351. - name: Record missing tool
  1352. id: missing_tool
  1353. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1354. env:
  1355. GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
  1356. GH_AW_MISSING_TOOL_CREATE_ISSUE: "true"
  1357. GH_AW_WORKFLOW_NAME: "Weekly Report"
  1358. GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/weekly-report.md"
  1359. with:
  1360. github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  1361. script: |
  1362. const path = require('path');
  1363. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1364. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1365. setupGlobals(core, github, context, exec, io, getOctokit);
  1366. const { main } = require(path.join(actionsDir, 'missing_tool.cjs'));
  1367. await main();
  1368. - name: Record incomplete
  1369. id: report_incomplete
  1370. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1371. env:
  1372. GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
  1373. GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true"
  1374. GH_AW_WORKFLOW_NAME: "Weekly Report"
  1375. GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/weekly-report.md"
  1376. with:
  1377. github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  1378. script: |
  1379. const path = require('path');
  1380. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1381. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1382. setupGlobals(core, github, context, exec, io, getOctokit);
  1383. const { main } = require(path.join(actionsDir, 'report_incomplete_handler.cjs'));
  1384. await main();
  1385. - name: Handle agent failure
  1386. id: handle_agent_failure
  1387. if: always()
  1388. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1389. env:
  1390. GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
  1391. GH_AW_WORKFLOW_NAME: "Weekly Report"
  1392. GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/weekly-report.md"
  1393. GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  1394. GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
  1395. GH_AW_WORKFLOW_ID: "weekly-report"
  1396. GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168"
  1397. GH_AW_ENGINE_ID: "codex"
  1398. GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }}
  1399. GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }}
  1400. GH_AW_AI_CREDITS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.ai_credits_rate_limit_error || 'false' }}
  1401. GH_AW_UNKNOWN_MODEL_AI_CREDITS: ${{ needs.agent.outputs.unknown_model_ai_credits || 'false' }}
  1402. GH_AW_AIC: ${{ needs.agent.outputs.aic }}
  1403. GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
  1404. GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_AI_CREDITS || '1000' }}
  1405. GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }}
  1406. GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }}
  1407. GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }}
  1408. GH_AW_MODEL_NOT_SUPPORTED_ERROR: ${{ needs.agent.outputs.model_not_supported_error }}
  1409. GH_AW_HTTP_400_RESPONSE_ERROR: ${{ needs.agent.outputs.http_400_response_error }}
  1410. GH_AW_MAX_CACHE_MISSES_EXCEEDED: ${{ needs.agent.outputs.max_cache_misses_exceeded }}
  1411. GH_AW_MISSING_MODEL_PRICING_ERROR: ${{ needs.agent.outputs.missing_model_pricing_error }}
  1412. GH_AW_MISSING_MODEL_PRICING_MODEL_NAME: ${{ needs.agent.outputs.missing_model_pricing_model_name }}
  1413. GH_AW_SHELL_EXPANSION_GUARD_REJECTED: ${{ needs.agent.outputs.shell_expansion_guard_rejected }}
  1414. GH_AW_ENGINE_API_HOSTS: "api.openai.com"
  1415. GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }}
  1416. GH_AW_OAUTH_TOKEN_CHECK_FAILED: ${{ needs.activation.outputs.oauth_token_check_failed }}
  1417. GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }}
  1418. GH_AW_DAILY_AI_CREDITS_EXCEEDED: ${{ needs.activation.outputs.daily_ai_credits_exceeded }}
  1419. GH_AW_DAILY_AI_CREDITS_GUARDRAIL_STATUS: ${{ needs.activation.outputs.daily_ai_credits_guardrail_status }}
  1420. GH_AW_DAILY_AI_CREDITS_GUARDRAIL_ERROR: ${{ needs.activation.outputs.daily_ai_credits_guardrail_error }}
  1421. GH_AW_DAILY_AI_CREDITS_TOTAL: ${{ needs.activation.outputs.daily_ai_credits_total }}
  1422. GH_AW_DAILY_AI_CREDITS_THRESHOLD: ${{ needs.activation.outputs.daily_ai_credits_threshold }}
  1423. GH_AW_DAILY_AI_CREDITS_CONTINUE_ON_ERROR: "false"
  1424. GH_AW_GROUP_REPORTS: "false"
  1425. GH_AW_FAILURE_REPORT_AS_ISSUE: "true"
  1426. GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true"
  1427. GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true"
  1428. GH_AW_TIMEOUT_MINUTES: "20"
  1429. with:
  1430. github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  1431. script: |
  1432. const path = require('path');
  1433. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1434. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1435. setupGlobals(core, github, context, exec, io, getOctokit);
  1436. const { main } = require(path.join(actionsDir, 'handle_agent_failure.cjs'));
  1437. await main();
  1438. - name: Report failed jobs
  1439. id: report_failed_jobs
  1440. if: always()
  1441. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1442. env:
  1443. GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
  1444. GH_AW_WORKFLOW_NAME: "Weekly Report"
  1445. GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/weekly-report.md"
  1446. GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
  1447. GH_AW_REPORT_FAILED_JOBS: "true"
  1448. with:
  1449. github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  1450. script: |
  1451. const path = require('path');
  1452. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1453. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1454. setupGlobals(core, github, context, exec, io, getOctokit);
  1455. const { main } = require(path.join(actionsDir, 'report_failed_jobs.cjs'));
  1456. await main();
  1457. detection:
  1458. needs:
  1459. - activation
  1460. - agent
  1461. if: always() && needs.agent.result != 'skipped'
  1462. runs-on: ubuntu-latest
  1463. permissions:
  1464. contents: read
  1465. timeout-minutes: 10
  1466. env:
  1467. GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
  1468. outputs:
  1469. aic: ${{ steps.parse_detection_token_usage.outputs.aic }}
  1470. detection_conclusion: ${{ steps.detection_conclusion.outputs.conclusion }}
  1471. detection_reason: ${{ steps.detection_conclusion.outputs.reason }}
  1472. detection_success: ${{ steps.detection_conclusion.outputs.success }}
  1473. steps:
  1474. - name: Setup Scripts
  1475. id: setup
  1476. uses: github/gh-aw-actions/setup@924af5fdc64061cfbf66fb584c8b07e2ac230c60 # v0.89.21
  1477. with:
  1478. destination: ${{ runner.temp }}/gh-aw/actions
  1479. job-name: ${{ github.job }}
  1480. trace-id: ${{ needs.activation.outputs.setup-trace-id }}
  1481. parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
  1482. env:
  1483. GH_AW_SETUP_WORKFLOW_NAME: "Weekly Report"
  1484. GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/weekly-report.lock.yml@${{ github.ref }}
  1485. GH_AW_INFO_VERSION: "0.154.0"
  1486. GH_AW_INFO_AWF_VERSION: "v0.28.23"
  1487. GH_AW_INFO_ENGINE_ID: "codex"
  1488. - name: Download activation artifact
  1489. continue-on-error: true
  1490. uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  1491. with:
  1492. name: activation
  1493. path: /tmp/gh-aw
  1494. - name: Download agent output artifact
  1495. id: download-agent-output
  1496. continue-on-error: true
  1497. uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  1498. with:
  1499. pattern: "{agent,agent-output-fallback}"
  1500. merge-multiple: true
  1501. path: /tmp/gh-aw/
  1502. - name: Setup agent output environment variable
  1503. id: setup-agent-output-env
  1504. if: steps.download-agent-output.outcome == 'success'
  1505. run: |
  1506. mkdir -p /tmp/gh-aw/
  1507. find "/tmp/gh-aw/" -type f -print
  1508. if [ -f "/tmp/gh-aw/agent_output.json" ]; then
  1509. echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
  1510. fi
  1511. - name: Checkout repository for patch context
  1512. if: needs.agent.outputs.has_patch == 'true'
  1513. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  1514. with:
  1515. persist-credentials: false
  1516. # --- Threat Detection ---
  1517. - name: Initialize detection execution evidence
  1518. run: |
  1519. mkdir -p "/tmp/gh-aw/threat-detection"
  1520. evidence_tmp="/tmp/gh-aw/threat-detection/execution.json.tmp"
  1521. printf '{"version":1,"component":"detection","run_id":%s,"run_attempt":%s,"state":"not_started"}\n' "$GITHUB_RUN_ID" "$GITHUB_RUN_ATTEMPT" > "$evidence_tmp"
  1522. mv "$evidence_tmp" "/tmp/gh-aw/threat-detection/execution.json"
  1523. - name: Clear inherited Copilot session state
  1524. run: rm -rf /tmp/gh-aw/sandbox/agent/logs/copilot-session-state
  1525. - name: Clean stale firewall files from agent artifact
  1526. run: |
  1527. rm -rf /tmp/gh-aw/sandbox/firewall/logs
  1528. rm -rf /tmp/gh-aw/sandbox/firewall/audit
  1529. - name: Download container images
  1530. run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.28.23@sha256:2c78aaba1c108e130e2d6d01e4f2cca334ea04c53e6f258913ac34173fe7e3b2 ghcr.io/github/gh-aw-firewall/api-proxy:0.28.23@sha256:c15c3d1208df10c5b588a3657be53742aa982ae0909d1eb1812525268794ca64 ghcr.io/github/gh-aw-firewall/squid:0.28.23@sha256:02ffc56dd40158223064ef03a78c2d9717473c93723b4e403d455ea6f0b09ae0
  1531. - name: Check if detection needed
  1532. id: detection_guard
  1533. if: always()
  1534. env:
  1535. OUTPUT_TYPES: ${{ needs.agent.outputs.output_types }}
  1536. HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
  1537. run: |
  1538. if [[ -n "$OUTPUT_TYPES" || "$HAS_PATCH" == "true" ]]; then
  1539. echo "run_detection=true" >> "$GITHUB_OUTPUT"
  1540. echo "Detection will run: output_types=$OUTPUT_TYPES, has_patch=$HAS_PATCH"
  1541. else
  1542. echo "run_detection=false" >> "$GITHUB_OUTPUT"
  1543. echo "Detection skipped: no agent outputs or patches to analyze"
  1544. fi
  1545. - name: Clear MCP Config for detection
  1546. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1547. run: |
  1548. rm -f "${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json"
  1549. rm -f "$HOME/.copilot/mcp-config.json"
  1550. rm -f "$GITHUB_WORKSPACE/.gemini/settings.json"
  1551. - name: Prepare threat detection files
  1552. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1553. run: |
  1554. bash "${RUNNER_TEMP}/gh-aw/actions/prepare_threat_detection_files.sh"
  1555. - name: Setup threat detection
  1556. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1557. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1558. env:
  1559. WORKFLOW_NAME: "Weekly Report"
  1560. WORKFLOW_DESCRIPTION: "每周自动生成仓库活动报告,包括 PR/Issue 列表、Changelog、贡献者统计等"
  1561. HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
  1562. GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
  1563. GH_AW_DETECTION_SKIP_PROMPT_SUMMARY: "true"
  1564. with:
  1565. script: |
  1566. const path = require('path');
  1567. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1568. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1569. setupGlobals(core, github, context, exec, io, getOctokit);
  1570. const { main } = require(path.join(actionsDir, 'setup_threat_detection.cjs'));
  1571. await main();
  1572. - name: Ensure threat-detection directory and log
  1573. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1574. run: |
  1575. mkdir -p /tmp/gh-aw/threat-detection
  1576. touch /tmp/gh-aw/threat-detection/detection.log
  1577. - name: Install AWF binary
  1578. run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.28.23 --rootless
  1579. - name: Setup Node.js
  1580. uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
  1581. with:
  1582. node-version: '24'
  1583. package-manager-cache: false
  1584. - name: Install Codex CLI
  1585. run: npm install --ignore-scripts -g @openai/codex@0.154.0
  1586. - name: Prepare Codex config for threat-detect
  1587. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1588. run: |
  1589. mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config" "/tmp/gh-aw/mcp-config" "/tmp/gh-aw/mcp-config/logs/"
  1590. printf '%s\n' "{\"mcpServers\":{}}" > "${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json"
  1591. # Point Codex at the AWF OpenAI proxy and disable websocket startup.
  1592. cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_DETECTION_CONFIG_af28c8b5454431f5_EOF
  1593. model_provider = "openai-proxy"
  1594. [history]
  1595. persistence = "none"
  1596. [model_providers.openai-proxy]
  1597. name = "OpenAI AWF proxy"
  1598. base_url = "http://172.30.0.30:10000"
  1599. api_base = "http://172.30.0.30:10000"
  1600. wss_base = "ws://172.30.0.30:10000"
  1601. env_key = "CODEX_API_KEY"
  1602. wire_api = "responses"
  1603. requires_openai_auth = false
  1604. supports_websockets = false
  1605. GH_AW_CODEX_DETECTION_CONFIG_af28c8b5454431f5_EOF
  1606. cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "/tmp/gh-aw/mcp-config/config.toml"
  1607. chmod 600 "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "/tmp/gh-aw/mcp-config/config.toml"
  1608. - name: Install threat-detect binary
  1609. id: threat_detect_install
  1610. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1611. continue-on-error: true
  1612. run: |
  1613. bash "${RUNNER_TEMP}/gh-aw/actions/install_threat_detect_binary.sh" v0.5.2 --artifact-base-url https://github.com/github/gh-aw-threat-detection/releases/download --sha256-amd64 b4ecda6a8f1ee09913c40b58e5e9d3337d2173618d41b1bfdef9207e4e7959b9 --sha256-arm64 f6260a0f9ad72bcb67c7af19c4ce262ca34e2c3d5ccbf912832a8bd277200904
  1614. - name: Execute threat detection with AWF
  1615. id: detection_agentic_execution
  1616. if: always() && steps.detection_guard.outputs.run_detection == 'true' && steps.threat_detect_install.outcome == 'success'
  1617. continue-on-error: true
  1618. timeout-minutes: 10
  1619. env:
  1620. AWF_REFLECT_ENABLED: 1
  1621. CODEX_API_KEY: ${{ secrets.CODEX_API_KEY || secrets.OPENAI_API_KEY }}
  1622. CODEX_HOME: /tmp/gh-aw/mcp-config
  1623. GH_AW_HARNESS_MAX_RETRIES: 0
  1624. GH_AW_LLM_PROVIDER: openai
  1625. GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_DETECTION_MAX_AI_CREDITS || '400' }}
  1626. GH_AW_MAX_TURNS: ${{ vars.GH_AW_DEFAULT_MAX_TURNS || '' }}
  1627. GH_AW_MCP_CONFIG: ${{ runner.temp }}/gh-aw/mcp-config/config.toml
  1628. GH_AW_MODEL_DETECTION_CODEX: gpt-5.6-luna
  1629. GH_AW_PHASE: detection
  1630. GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
  1631. GH_AW_VERSION: v0.89.21
  1632. GITHUB_AW: true
  1633. GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
  1634. GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
  1635. GIT_AUTHOR_NAME: github-actions[bot]
  1636. GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
  1637. GIT_COMMITTER_NAME: github-actions[bot]
  1638. OPENAI_API_KEY: ${{ secrets.PIXEL_API_KEY }}
  1639. OPENAI_BASE_URL: https://ai-pixel.online
  1640. RUNNER_TEMP: ${{ runner.temp }}
  1641. RUST_LOG: ${{ runner.debug == 1 && 'trace,hyper_util=info,mio=info,reqwest=info,os_info=info,codex_otel=warn,codex_core=debug,codex_exec=debug' || 'warn' }}
  1642. TRACEPARENT: ${{ env.GITHUB_AW_OTEL_TRACE_ID != '' && env.GITHUB_AW_OTEL_PARENT_SPAN_ID != '' && format('00-{0}-{1}-01', env.GITHUB_AW_OTEL_TRACE_ID, env.GITHUB_AW_OTEL_PARENT_SPAN_ID) || '' }}
  1643. WORKFLOW_NAME: "Weekly Report"
  1644. WORKFLOW_DESCRIPTION: "每周自动生成仓库活动报告,包括 PR/Issue 列表、Changelog、贡献者统计等"
  1645. HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
  1646. GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
  1647. run: |
  1648. mkdir -p "/tmp/gh-aw/threat-detection"
  1649. evidence_tmp="/tmp/gh-aw/threat-detection/execution.json.tmp"
  1650. printf '{"version":1,"component":"detection","run_id":%s,"run_attempt":%s,"state":"started"}\n' "$GITHUB_RUN_ID" "$GITHUB_RUN_ATTEMPT" > "$evidence_tmp"
  1651. mv "$evidence_tmp" "/tmp/gh-aw/threat-detection/execution.json"
  1652. export GH_AW_AWF_EXECUTION_COMPONENT="detection"
  1653. export GH_AW_AWF_EXECUTION_EVIDENCE_FILE="/tmp/gh-aw/threat-detection/execution.json"
  1654. set -o pipefail
  1655. printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt
  1656. (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log)
  1657. GH_AW_MAX_AI_CREDITS="${GH_AW_MAX_AI_CREDITS:-400}"
  1658. if [[ ! "$GH_AW_MAX_AI_CREDITS" =~ ^[0-9]+$ ]]; then
  1659. GH_AW_MAX_AI_CREDITS="400"
  1660. fi
  1661. printf '%s\n' "{\"\$schema\":\"https://github.com/github/gh-aw-firewall/releases/download/v0.28.23/awf-config.schema.json\",\"network\":{\"allowDomains\":[\"172.30.0.1\",\"ai-pixel.online\",\"api-inference.modelscope.cn\",\"api.commandcode.ai\",\"api.deepseek.com\",\"api.github.com\",\"api.minimaxi.com\",\"api.openai.com\",\"chatgpt.com\",\"github.com\",\"host.docker.internal\",\"open.bigmodel.cn\",\"openai.com\",\"opencode.ai\"]},\"apiProxy\":{\"enabled\":true,\"enableTokenSteering\":true,\"maxRuns\":500,\"maxAiCredits\":${GH_AW_MAX_AI_CREDITS},\"maxCacheMisses\":5,\"modelFallback\":{\"enabled\":false},\"targets\":{\"openai\":{\"host\":\"ai-pixel.online\"}},\"models\":{\"agent\":[\"sonnet-6x\",\"gpt-6\",\"gpt-5.4\",\"gpt-5.5\",\"gpt-5.6\",\"gpt-5.3\",\"gemini-pro\",\"any\"],\"antigravity\":[\"copilot/antigravity*\",\"google/antigravity*\",\"gemini/antigravity*\"],\"any\":[\"copilot/*\",\"anthropic/*\",\"openai/*\",\"google/*\",\"gemini/*\"],\"auto\":[\"copilot/auto\",\"large\"],\"claude\":[\"agent\"],\"codex\":[\"agent\"],\"coding\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\",\"gpt-5-codex\",\"kimi\"],\"computer-use\":[\"copilot/*computer-use*\",\"google/*computer-use*\",\"gemini/*computer-use*\",\"openai/*computer-use*\"],\"copilot\":[\"agent\"],\"deep-research\":[\"copilot/deep-research*\",\"copilot/o3-deep-research*\",\"copilot/o4-mini-deep-research*\",\"google/deep-research*\",\"gemini/deep-research*\",\"openai/o3-deep-research*\",\"openai/o4-mini-deep-research*\"],\"detection\":[\"small\"],\"evals\":[\"small\"],\"fable\":[\"copilot/*fable*\",\"anthropic/*fable*\"],\"gemini\":[\"agent\"],\"gemini-3-flash\":[\"copilot/gemini-3*flash*\",\"google/gemini-3*flash*\",\"gemini/gemini-3*flash*\"],\"gemini-3-pro\":[\"copilot/gemini-3*pro*\",\"google/gemini-3*pro*\",\"google/nano-banana*\",\"gemini/gemini-3*pro*\"],\"gemini-3.1-flash\":[\"copilot/gemini-3.1*flash*\",\"google/gemini-3.1*flash*\",\"gemini/gemini-3.1*flash*\"],\"gemini-3.1-pro\":[\"copilot/gemini-3.1*pro*\",\"google/gemini-3.1*pro*\",\"gemini/gemini-3.1*pro*\"],\"gemini-3.5-flash\":[\"copilot/gemini-3.5*flash*\",\"google/gemini-3.5*flash*\",\"gemini/gemini-3.5*flash*\"],\"gemini-3.6-flash\":[\"copilot/gemini-3.6*flash*\",\"google/gemini-3.6*flash*\",\"gemini/gemini-3.6*flash*\"],\"gemini-3.7-flash\":[\"copilot/gemini-3.7*flash*\",\"google/gemini-3.7*flash*\",\"gemini/gemini-3.7*flash*\"],\"gemini-3.8-flash\":[\"copilot/gemini-3.8*flash*\",\"google/gemini-3.8*flash*\",\"gemini/gemini-3.8*flash*\"],\"gemini-flash\":[\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"],\"gemini-flash-lite\":[\"copilot/gemini-*flash*lite*\",\"google/gemini-*flash*lite*\",\"gemini/gemini-*flash*lite*\"],\"gemini-omni\":[\"copilot/gemini-omni*\",\"google/gemini-omni*\",\"gemini/gemini-omni*\"],\"gemini-pro\":[\"copilot/gemini-*pro*\",\"google/gemini-*pro*\",\"gemini/gemini-*pro*\"],\"gemma\":[\"copilot/gemma*\",\"google/gemma*\",\"gemini/gemma*\"],\"gpt-5\":[\"copilot/gpt-5*\",\"openai/gpt-5*\"],\"gpt-5-codex\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\"],\"gpt-5-mini\":[\"copilot/gpt-5*mini*\",\"openai/gpt-5*mini*\"],\"gpt-5-nano\":[\"copilot/gpt-5*nano*\",\"openai/gpt-5*nano*\"],\"gpt-5-pro\":[\"copilot/gpt-5*pro*\",\"openai/gpt-5*pro*\"],\"gpt-5.1\":[\"copilot/gpt-5.1*\",\"openai/gpt-5.1*\"],\"gpt-5.2\":[\"copilot/gpt-5.2*\",\"openai/gpt-5.2*\"],\"gpt-5.3\":[\"copilot/gpt-5.3*\",\"openai/gpt-5.3*\"],\"gpt-5.4\":[\"copilot/gpt-5.4*\",\"openai/gpt-5.4*\"],\"gpt-5.5\":[\"copilot/gpt-5.5*\",\"openai/gpt-5.5*\"],\"gpt-5.6\":[\"copilot/gpt-5.6*\",\"openai/gpt-5.6*\"],\"gpt-6\":[\"copilot/gpt-6*\",\"openai/gpt-6*\"],\"grok\":[\"copilot/*grok*\",\"openai/*grok*\"],\"haiku\":[\"copilot/*haiku*\",\"anthropic/*haiku*\"],\"image-generation\":[\"copilot/gpt-image*\",\"openai/gpt-image*\",\"openai/chatgpt-image*\",\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"google/imagen*\"],\"kimi\":[\"copilot/kimi*\",\"openai/kimi*\"],\"kiwi\":[\"copilot/kiwi*\",\"openai/kiwi*\"],\"large\":[\"sonnet\",\"gpt-6\",\"gpt-5-pro\",\"gpt-5\",\"gemini-pro\"],\"lyria\":[\"google/lyria*\",\"gemini/lyria*\",\"copilot/lyria*\"],\"mai-code\":[\"copilot/MAI-Code*\",\"copilot/mai-code*\",\"openai/MAI-Code*\"],\"mai-code-1-flash-picker\":[\"copilot/MAI-Code-1-Flash-picker*\",\"copilot/mai-code-1-flash-picker*\",\"openai/MAI-Code-1-Flash-picker*\"],\"mini\":[\"haiku\",\"gpt-5-mini\",\"gpt-5-nano\",\"gemini-flash-lite\"],\"nano-banana\":[\"copilot/nano-banana*\",\"google/nano-banana*\",\"gemini/nano-banana*\"],\"opus\":[\"copilot/*opus*\",\"anthropic/*opus*\"],\"opusplan\":[\"opus?effort=high\"],\"raptor-mini\":[\"copilot/raptor*\",\"openai/raptor*\"],\"reasoning\":[\"copilot/o1*\",\"copilot/o3*\",\"copilot/o4*\",\"openai/o1*\",\"openai/o3*\",\"openai/o4*\"],\"robotics\":[\"copilot/*robotics*\",\"google/*robotics*\",\"gemini/*robotics*\"],\"small\":[\"mini\"],\"small-agent\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash\"],\"sonnet\":[\"copilot/*sonnet*\",\"anthropic/*sonnet*\"],\"sonnet-6x\":[\"copilot/*sonnet-4.5*\",\"copilot/*sonnet-4.6*\",\"copilot/*sonnet-5*\",\"copilot/*sonnet-4-5-*\",\"anthropic/*sonnet-4-5-*\",\"copilot/*sonnet-4-6*\",\"anthropic/*sonnet-4-6*\",\"anthropic/*sonnet-5*\"],\"summarization\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash-lite\",\"mini\"],\"veo\":[\"google/veo*\",\"gemini/veo*\"],\"vision\":[\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"]}},\"container\":{\"imageTag\":\"0.28.23,squid=sha256:02ffc56dd40158223064ef03a78c2d9717473c93723b4e403d455ea6f0b09ae0,agent=sha256:2c78aaba1c108e130e2d6d01e4f2cca334ea04c53e6f258913ac34173fe7e3b2,api-proxy=sha256:c15c3d1208df10c5b588a3657be53742aa982ae0909d1eb1812525268794ca64,cli-proxy=sha256:9e31a6e518eba44652b9ae94ce55c3b6958e06290c3b81b08de4174751bb439a\"},\"logging\":{\"proxyLogsDir\":\"/tmp/gh-aw/sandbox/firewall/logs\",\"auditDir\":\"/tmp/gh-aw/sandbox/firewall/audit\"}}" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
  1662. cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json
  1663. export GH_AW_MODELS_JSON_PATH="/tmp/gh-aw/models.json"
  1664. GH_AW_DOCKER_HOST=""
  1665. if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
  1666. GH_AW_DOCKER_HOST="${DOCKER_HOST}"
  1667. fi
  1668. if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
  1669. _GH_AW_CHROOT_JSON=$(jq -c --arg src "${RUNNER_TEMP}/gh-aw" --arg user "$(id -un)" --argjson uid "$(id -u)" --argjson gid "$(id -g)" --arg home "${RUNNER_TEMP}/gh-aw/home" '.chroot={"binariesSourcePath":$src,"identity":{"user":$user,"uid":$uid,"gid":$gid,"home":$home}}' "${RUNNER_TEMP}/gh-aw/awf-config.json") || { echo "chroot config patch failed" >&2; exit 1; }
  1670. printf '%s\n' "$_GH_AW_CHROOT_JSON" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
  1671. fi
  1672. GH_AW_TOOL_CACHE_MOUNT=""
  1673. GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"
  1674. if [ -d "$GH_AW_TOOL_CACHE" ]; then
  1675. if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then
  1676. GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
  1677. fi
  1678. fi
  1679. # shellcheck disable=SC1003,SC2016,SC2086
  1680. awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env ACTIONS_ID_TOKEN_REQUEST_TOKEN --exclude-env ACTIONS_ID_TOKEN_REQUEST_URL --exclude-env CODEX_API_KEY --exclude-env COPILOT_GITHUB_TOKEN --exclude-env OPENAI_API_KEY --mount /tmp/gh-aw:/tmp/gh-aw:rw --mount /tmp/gh-aw/threat-detection:/tmp/gh-aw/threat-detection:rw --log-level info --skip-pull \
  1681. -- /bin/bash -c 'set +o histexpand; : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; GH_AW_TOOL_BINS="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')"; GH_AW_TOOL_BINS="${GH_AW_TOOL_BINS%:}"; export PATH="$PATH${GH_AW_TOOL_BINS:+:}$GH_AW_TOOL_BINS"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && threat-detect --engine codex --output /tmp/gh-aw/threat-detection/detection_result.json /tmp/gh-aw/threat-detection' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log
  1682. - name: Render detection log
  1683. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1684. continue-on-error: true
  1685. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1686. with:
  1687. script: |
  1688. const path = require('path');
  1689. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1690. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1691. setupGlobals(core, github, context, exec, io, getOctokit);
  1692. const { main } = require(path.join(actionsDir, 'render_detection_log.cjs'));
  1693. await main();
  1694. - name: Copy detection firewall logs
  1695. if: always() && steps.detection_guard.outputs.run_detection == 'true'
  1696. continue-on-error: true
  1697. run: |
  1698. mkdir -p /tmp/gh-aw/threat-detection/sandbox/firewall
  1699. if [ -d /tmp/gh-aw/sandbox/firewall/logs ]; then mkdir -p /tmp/gh-aw/threat-detection/sandbox/firewall/logs && cp -r /tmp/gh-aw/sandbox/firewall/logs/. /tmp/gh-aw/threat-detection/sandbox/firewall/logs/; fi
  1700. if [ -d /tmp/gh-aw/sandbox/firewall/audit ]; then mkdir -p /tmp/gh-aw/threat-detection/sandbox/firewall/audit && cp -r /tmp/gh-aw/sandbox/firewall/audit/. /tmp/gh-aw/threat-detection/sandbox/firewall/audit/; fi
  1701. - name: Parse threat detection token usage for step summary
  1702. id: parse_detection_token_usage
  1703. if: always()
  1704. continue-on-error: true
  1705. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1706. env:
  1707. GH_AW_TOKEN_USAGE_SUMMARY_TITLE: Threat Detection Token Usage
  1708. GH_AW_AGENT_USAGE_PATH: /tmp/gh-aw/threat-detection/detection_usage.json
  1709. GH_AW_AGENT_USAGE_JSONL_PATH: /tmp/gh-aw/threat-detection/detection_usage.jsonl
  1710. GH_AW_WRITE_EMPTY_USAGE: "true"
  1711. with:
  1712. script: |
  1713. const path = require('path');
  1714. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1715. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1716. setupGlobals(core, github, context, exec, io, getOctokit);
  1717. const { main } = require(path.join(actionsDir, 'parse_token_usage.cjs'));
  1718. await main();
  1719. - name: Upload threat detection artifact
  1720. if: always()
  1721. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  1722. with:
  1723. name: detection
  1724. path: |
  1725. /tmp/gh-aw/threat-detection/detection_result.json
  1726. /tmp/gh-aw/threat-detection/execution.json
  1727. /tmp/gh-aw/threat-detection/detection_usage.json
  1728. /tmp/gh-aw/threat-detection/detection_usage.jsonl
  1729. /tmp/gh-aw/threat-detection/sandbox/firewall/logs/
  1730. /tmp/gh-aw/threat-detection/sandbox/firewall/audit/
  1731. if-no-files-found: ignore
  1732. - name: Conclude threat detection
  1733. id: detection_conclusion
  1734. if: always()
  1735. continue-on-error: true
  1736. env:
  1737. RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }}
  1738. DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }}
  1739. THREAT_DETECT_INSTALL_OUTCOME: ${{ steps.threat_detect_install.outcome }}
  1740. GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
  1741. run: |
  1742. bash "${RUNNER_TEMP}/gh-aw/actions/conclude_threat_detection.sh" /tmp/gh-aw/threat-detection/detection_result.json
  1743. safe_outputs:
  1744. needs:
  1745. - activation
  1746. - agent
  1747. - detection
  1748. if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
  1749. runs-on: ubuntu-slim
  1750. permissions:
  1751. issues: write
  1752. timeout-minutes: 45
  1753. env:
  1754. GH_AW_AGENT_AIC: ${{ needs.agent.outputs.aic }}
  1755. GH_AW_AIC: ${{ needs.agent.outputs.aic }}
  1756. GH_AW_AMBIENT_CONTEXT: ${{ needs.agent.outputs.ambient_context }}
  1757. GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/weekly-report"
  1758. GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }}
  1759. GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }}
  1760. GH_AW_ENGINE_ID: "codex"
  1761. GH_AW_ENGINE_MODEL: "gpt-5.6-luna"
  1762. GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
  1763. GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
  1764. GH_AW_WORKFLOW_ID: "weekly-report"
  1765. GH_AW_WORKFLOW_NAME: "Weekly Report"
  1766. GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/weekly-report.md"
  1767. outputs:
  1768. code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }}
  1769. code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }}
  1770. create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }}
  1771. create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }}
  1772. created_issue_number: ${{ steps.process_safe_outputs.outputs.created_issue_number }}
  1773. created_issue_url: ${{ steps.process_safe_outputs.outputs.created_issue_url }}
  1774. process_safe_outputs_items_applied: ${{ steps.process_safe_outputs.outputs.items_applied }}
  1775. process_safe_outputs_items_cancelled: ${{ steps.process_safe_outputs.outputs.items_cancelled }}
  1776. process_safe_outputs_items_deferred: ${{ steps.process_safe_outputs.outputs.items_deferred }}
  1777. process_safe_outputs_items_failed: ${{ steps.process_safe_outputs.outputs.items_failed }}
  1778. process_safe_outputs_items_skipped: ${{ steps.process_safe_outputs.outputs.items_skipped }}
  1779. process_safe_outputs_items_succeeded: ${{ steps.process_safe_outputs.outputs.items_succeeded }}
  1780. process_safe_outputs_items_warnings: ${{ steps.process_safe_outputs.outputs.items_warnings }}
  1781. process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }}
  1782. process_safe_outputs_status: ${{ steps.process_safe_outputs.outputs.status }}
  1783. steps:
  1784. - name: Setup Scripts
  1785. id: setup
  1786. uses: github/gh-aw-actions/setup@924af5fdc64061cfbf66fb584c8b07e2ac230c60 # v0.89.21
  1787. with:
  1788. destination: ${{ runner.temp }}/gh-aw/actions
  1789. job-name: ${{ github.job }}
  1790. trace-id: ${{ needs.activation.outputs.setup-trace-id }}
  1791. parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
  1792. env:
  1793. GH_AW_SETUP_WORKFLOW_NAME: "Weekly Report"
  1794. GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/weekly-report.lock.yml@${{ github.ref }}
  1795. GH_AW_INFO_VERSION: "0.154.0"
  1796. GH_AW_INFO_AWF_VERSION: "v0.28.23"
  1797. GH_AW_INFO_ENGINE_ID: "codex"
  1798. - name: Mask OTLP telemetry headers
  1799. run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
  1800. - name: Download agent output artifact
  1801. id: download-agent-output
  1802. continue-on-error: true
  1803. uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
  1804. with:
  1805. pattern: "{agent,agent-output-fallback}"
  1806. merge-multiple: true
  1807. path: /tmp/gh-aw/
  1808. - name: Setup agent output environment variable
  1809. id: setup-agent-output-env
  1810. if: steps.download-agent-output.outcome == 'success'
  1811. run: |
  1812. mkdir -p /tmp/gh-aw/
  1813. find "/tmp/gh-aw/" -type f -print
  1814. if [ -f "/tmp/gh-aw/agent_output.json" ]; then
  1815. echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
  1816. fi
  1817. - name: Configure GH_HOST for enterprise compatibility
  1818. id: ghes-host-config
  1819. shell: bash
  1820. run: | # zizmor: ignore[github-env] - GITHUB_SERVER_URL is set by GitHub Actions, not user input.
  1821. # Derive GH_HOST from GITHUB_SERVER_URL so the gh CLI targets the correct
  1822. # GitHub instance (GHES/GHEC). On github.com this is a harmless no-op.
  1823. GH_HOST="${GITHUB_SERVER_URL#https://}"
  1824. GH_HOST="${GH_HOST#http://}"
  1825. echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV"
  1826. - name: Process Safe Outputs
  1827. id: process_safe_outputs
  1828. uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
  1829. env:
  1830. GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
  1831. GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }}
  1832. GH_AW_ALLOWED_DOMAINS: "ai-pixel.online,api-inference.modelscope.cn,api.commandcode.ai,api.deepseek.com,api.minimaxi.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,open.bigmodel.cn,opencode.ai,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,s.symcb.com,s.symcd.com,security.ubuntu.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
  1833. GITHUB_SERVER_URL: ${{ github.server_url }}
  1834. GITHUB_API_URL: ${{ github.api_url }}
  1835. GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"close_older_issues\":true,\"expires\":720,\"labels\":[\"weekly-report\",\"report\"],\"max\":1,\"title_prefix\":\"Weekly Report: \"},\"create_report_incomplete_issue\":{},\"mentions\":{\"enabled\":false},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}"
  1836. with:
  1837. github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
  1838. script: |
  1839. const path = require('path');
  1840. const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
  1841. const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
  1842. setupGlobals(core, github, context, exec, io, getOctokit);
  1843. const { main } = require(path.join(actionsDir, 'process_safe_outputs.cjs'));
  1844. await main();
  1845. - name: Upload Safe Outputs Items
  1846. if: always()
  1847. uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
  1848. with:
  1849. name: safe-outputs-items
  1850. path: |
  1851. /tmp/gh-aw/safe-output-items.jsonl
  1852. /tmp/gh-aw/temporary-id-map.json
  1853. /tmp/gh-aw/safe-output-errors.json
  1854. if-no-files-found: ignore