{
  "name": "Monitor GitHub repo access and push events with GitHub and Slack alerts",
  "nodes": [
    {
      "id": "fec58465-8d55-497b-8550-b2571ef4cebf",
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        688,
        608
      ]
    },
    {
      "id": "3e4b9b99-152f-4a49-a358-fb3756068da7",
      "name": "Filter Member Events",
      "type": "n8n-nodes-base.code",
      "position": [
        1136,
        608
      ]
    },
    {
      "id": "4d1f6e99-53c5-4662-b26d-229d018b52b0",
      "name": "Check Whitelist",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1344,
        608
      ]
    },
    {
      "id": "27e8f26a-e630-4f77-8bbf-4a8eb1f23e90",
      "name": "Github Events (HTTP)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        928,
        608
      ]
    },
    {
      "id": "48130fa9-634d-4755-b16e-503394ac44ab",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1552,
        592
      ]
    },
    {
      "id": "9d8319f3-948e-4453-94b4-1d0a7067a456",
      "name": "PublicEvent",
      "type": "n8n-nodes-base.if",
      "position": [
        1760,
        608
      ]
    },
    {
      "id": "ed17c63b-dec3-41df-a533-c7e57e902f51",
      "name": "PushEvent",
      "type": "n8n-nodes-base.if",
      "position": [
        1760,
        768
      ]
    },
    {
      "id": "31f6a4b0-4a65-46a5-ae7c-6db969fdffc8",
      "name": "MemberEvent",
      "type": "n8n-nodes-base.if",
      "position": [
        1760,
        448
      ]
    },
    {
      "id": "e90ae829-d324-4c26-a3ea-f755b87ca245",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        208
      ],
      "parameters": {
        "width": 608,
        "height": 784,
        "content": "\n## Monitor GitHub Repositories for Unauthorized Actions\n\n### How it works:\n\nThis workflow monitors GitHub for high-risk activities to ensure that only authorized users can modify the repository. It p"
      }
    },
    {
      "id": "b6f4481b-bcc3-45c0-bef6-cca5a5c43ca3",
      "name": "Push Event Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        2160,
        752
      ]
    },
    {
      "id": "396f4a16-2432-4911-9ea4-27d04c94892f",
      "name": "Public Event Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        2160,
        592
      ]
    },
    {
      "id": "fe332c78-fee3-4802-bcee-0fd3395696e6",
      "name": "Member Event Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        2160,
        432
      ]
    },
    {
      "id": "489f1636-61db-4375-8f6c-a0c1eaf84bf5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        368
      ],
      "parameters": {
        "width": 576,
        "height": 384,
        "content": "## GitHub Events & Identity Check\n\nGitHub Node: Polls the API every 10 minutes to fetch the latest events and activity logs.\n\nFilter: Passes only Member, Public, and Push events while ignoring irrelev"
      }
    },
    {
      "id": "dc7b7e02-a468-4d72-b27b-7eb1ae2b57db",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        208
      ],
      "parameters": {
        "width": 640,
        "height": 768,
        "content": "## Switch and If Nodes to apply Security rules\n\nSwitch: Evaluates the event type (such as PushEvent) and routes the workflow into three dedicated branches, allowing event-specific security policies to"
      }
    },
    {
      "id": "e3cac6f2-eeac-4274-9a71-944bee482de5",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1984,
        832
      ]
    },
    {
      "id": "27e410da-5e06-4ff3-abff-1bdbd289a574",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        208
      ],
      "parameters": {
        "width": 320,
        "height": 768,
        "content": "## Slack Node (Alert System)\nNotify: Posts a message containing the event type and the GitHub username of the person who triggered it.\n\nTrigger: Only fires when a violation flows through the True path"
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "MemberEvent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PublicEvent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PushEvent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule": {
      "main": [
        [
          {
            "node": "Github Events (HTTP)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PushEvent": {
      "main": [
        [
          {
            "node": "Push Event Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MemberEvent": {
      "main": [
        [
          {
            "node": "Member Event Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PublicEvent": {
      "main": [
        [
          {
            "node": "Public Event Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Whitelist": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Member Events": {
      "main": [
        [
          {
            "node": "Check Whitelist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Github Events (HTTP)": {
      "main": [
        [
          {
            "node": "Filter Member Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}