Skip to content

Commit 4d02147

Browse files
committed
Update the doc queries.md
1 parent 6a81932 commit 4d02147

2 files changed

Lines changed: 1 addition & 125 deletions

File tree

docs/tables/github_security_log/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tailpipe collect github_security_log.my_security_logs
4545

4646
## Query
4747

48-
**[Explore 25+ example queries for this table →](https://hub.tailpipe.io/plugins/turbot/github/queries/github_security_log)**
48+
**[Explore 33+ example queries for this table →](https://hub.tailpipe.io/plugins/turbot/github/queries/github_security_log)**
4949

5050
### Recent login attempts
5151

docs/tables/github_security_log/queries.md

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
## Authentication Examples
22

3-
### Recent Login Attempts
4-
5-
Track recent login attempts to monitor account access patterns.
6-
7-
```sql
8-
select
9-
timestamp,
10-
action,
11-
actor,
12-
tp_source_ip,
13-
user_agent
14-
from
15-
github_security_log
16-
where
17-
action like '%login%'
18-
order by
19-
timestamp desc
20-
limit 20;
21-
```
22-
23-
```yaml
24-
folder: Authentication
25-
```
26-
273
### Failed Login Attempts
284

295
Identify failed login attempts that might indicate security threats.
@@ -547,31 +523,6 @@ order by
547523
folder: Security Analysis
548524
```
549525
550-
### Geographic Anomalies
551-
552-
Detect rapid geographic changes in access patterns (when location data is available).
553-
554-
```sql
555-
select
556-
timestamp,
557-
actor,
558-
tp_source_ip,
559-
action,
560-
lag(tp_source_ip) over (partition by actor order by timestamp) as previous_ip,
561-
lag(timestamp) over (partition by actor order by timestamp) as previous_timestamp
562-
from
563-
github_security_log
564-
where
565-
actor is not null
566-
and timestamp >= current_timestamp - interval '24 hours'
567-
order by
568-
actor, timestamp;
569-
```
570-
571-
```yaml
572-
folder: Security Analysis
573-
```
574-
575526
## Operational Monitoring
576527
577528
### Daily Security Event Trends
@@ -813,31 +764,6 @@ folder: Environment Security
813764
814765
## Repository Access Analysis
815766
816-
### Multi-Repository Token Analysis
817-
818-
Analyze tokens with access to multiple repositories.
819-
820-
```sql
821-
select
822-
timestamp,
823-
action,
824-
actor,
825-
cardinality(repositories) as repo_count,
826-
repositories,
827-
repository_selection
828-
from
829-
github_security_log
830-
where
831-
repositories is not null
832-
and cardinality(repositories) > 1
833-
order by
834-
repo_count desc, timestamp desc;
835-
```
836-
837-
```yaml
838-
folder: Repository Security
839-
```
840-
841767
### Repository Access Patterns
842768
843769
Track which repositories are most frequently accessed via security events.
@@ -871,53 +797,3 @@ limit 20;
871797
```yaml
872798
folder: Repository Security
873799
```
874-
875-
### Specific Repository Security Events
876-
877-
Monitor security events for a specific repository.
878-
879-
```sql
880-
select
881-
timestamp,
882-
action,
883-
actor,
884-
permissions,
885-
repository_selection
886-
from
887-
github_security_log
888-
where
889-
repositories @> '[313325091]' -- Replace with your repository ID
890-
order by
891-
timestamp desc;
892-
```
893-
894-
```yaml
895-
folder: Repository Security
896-
```
897-
898-
### Repository Permission Changes
899-
900-
Track changes in repository permissions using old_value and new_value fields.
901-
902-
```sql
903-
select
904-
timestamp,
905-
action,
906-
actor,
907-
repositories,
908-
old_value,
909-
new_value,
910-
permissions_added,
911-
permissions_upgraded
912-
from
913-
github_security_log
914-
where
915-
(old_value is not null or new_value is not null)
916-
and repositories is not null
917-
order by
918-
timestamp desc;
919-
```
920-
921-
```yaml
922-
folder: Repository Security
923-
```

0 commit comments

Comments
 (0)