Add workflow permissions for security compliance

Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-24 23:23:06 +00:00
parent 4e36eca69c
commit dfac5eacca
3 changed files with 8 additions and 0 deletions

View File

@@ -14,6 +14,9 @@ on:
schedule: schedule:
- cron: '*/15 * * * *' # Run every 15 minutes - cron: '*/15 * * * *' # Run every 15 minutes
permissions:
contents: read
env: env:
AGENT_NAME: guardian-clone-vault AGENT_NAME: guardian-clone-vault
AGENT_ROLE: sentinel AGENT_ROLE: sentinel

View File

@@ -152,6 +152,9 @@ on:
schedule: schedule:
- cron: '*/15 * * * *' # Run every 15 minutes - cron: '*/15 * * * *' # Run every 15 minutes
permissions:
contents: read
env: env:
AGENT_NAME: ${spawn} AGENT_NAME: ${spawn}
AGENT_ROLE: ${config.role} AGENT_ROLE: ${config.role}

View File

@@ -62,6 +62,8 @@ describe("generateAgentWorkflow", () => {
expect(workflow).toContain("AGENT_ROLE: sentinel"); expect(workflow).toContain("AGENT_ROLE: sentinel");
expect(workflow).toContain("workflow_dispatch:"); expect(workflow).toContain("workflow_dispatch:");
expect(workflow).toContain("schedule:"); expect(workflow).toContain("schedule:");
expect(workflow).toContain("permissions:");
expect(workflow).toContain("contents: read");
}); });
}); });