├── .gitattributes
├── jobs.png
├── new_data.png
├── updated_data.png
├── static
├── images
│ └── search.png
├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── js
│ ├── npm.js
│ └── bootstrap.min.js
└── css
│ ├── bootstrap-theme.min.css
│ ├── bootstrap-theme.min.css.map
│ └── bootstrap-theme.css
├── audit.go
├── .gitignore
├── views
├── _footer.html
├── admin.html
├── index.html
├── job.html
└── _header.html
├── audit_test.go
├── internal
├── migrations
│ ├── 00002_users.go
│ ├── 00001_init.go
│ ├── 00008_traceroute.go
│ ├── 00004_jobs.go
│ ├── 00011_submission.go
│ ├── 00013_audit_table.go
│ ├── 00007_job_count.go
│ ├── 00010_groups.go
│ ├── new-migrate
│ ├── 00009_job_traceroute_constraints.go
│ ├── 00006_scan_datetime.go
│ ├── 00005_job_requestor.go
│ └── 00003_time_int.go
└── sqlite
│ ├── audit.go
│ ├── auth.go
│ ├── job.go
│ └── sqlite.go
├── go.mod
├── Makefile
├── LICENSE
├── admin_test.go
├── pkg
└── scan
│ └── scan.go
├── metrics.go
├── admin.go
├── job_test.go
├── .circleci
└── config.yml
├── job.go
├── README.md
├── scan_test.go
├── auth.go
└── scan.go
/.gitattributes:
--------------------------------------------------------------------------------
1 | static/* linguist-vendored
2 |
--------------------------------------------------------------------------------
/jobs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/jobs.png
--------------------------------------------------------------------------------
/new_data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/new_data.png
--------------------------------------------------------------------------------
/updated_data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/updated_data.png
--------------------------------------------------------------------------------
/static/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/static/images/search.png
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/static/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jamesog/scan/HEAD/static/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/audit.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "time"
4 |
5 | // audit logs events to the audit table
6 | func (app *App) audit(user, event, info string) error {
7 | return app.db.SaveAudit(time.Now(), user, event, info)
8 | }
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore the binary
2 | /scan
3 | # Ignore the database
4 | scan.db
5 |
6 | # Don't ignore any Go source files
7 | !*.go
8 |
9 | # Vim swapfiles
10 | .*.swp
11 |
12 | # Secrets
13 | .cookie_key
14 | client_secret.json
15 |
--------------------------------------------------------------------------------
/views/_footer.html:
--------------------------------------------------------------------------------
1 | {{- define "footer" }}
2 |
3 |
4 |
5 |
6 |
7 |