Add workflow permissions for security compliance
Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -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");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user