Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Implemented with CLI firstly #23

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a0a28c2
Refactoring starting with go 1.19
Cellularhacker Aug 27, 2022
b2c4873
rename
Cellularhacker Aug 27, 2022
e2e94ee
change
Cellularhacker Aug 27, 2022
a8d28fc
Replaced external file
Cellularhacker Aug 27, 2022
1826a89
change path
Cellularhacker Aug 27, 2022
912bf9b
change path
Cellularhacker Aug 27, 2022
a1ddf7a
remove
Cellularhacker Aug 27, 2022
b2da949
Renam,e
Cellularhacker Aug 27, 2022
576aa2f
changed log
Cellularhacker Aug 27, 2022
eae3081
Added more DNS
Cellularhacker Aug 27, 2022
c68f629
Implement DnsSec API
Cellularhacker Aug 27, 2022
4f01370
go mod tidy
Cellularhacker Aug 27, 2022
2acd2ba
changed sort
Cellularhacker Aug 27, 2022
1349620
Added String() method for console users
Cellularhacker Aug 27, 2022
8b086c5
Added joinStr selection
Cellularhacker Aug 27, 2022
e8377ef
Renamed names
Cellularhacker Aug 27, 2022
9d4b67f
Added more DNS servers
Cellularhacker Aug 27, 2022
2618cf6
Added run mode now
Cellularhacker Aug 27, 2022
6219093
fixed typo
Cellularhacker Aug 27, 2022
949d15c
added more helps
Cellularhacker Aug 27, 2022
fcd8251
added join_string
Cellularhacker Aug 27, 2022
07f43a8
indent based on 8
Cellularhacker Aug 27, 2022
859de3d
Added dns filter
Cellularhacker Aug 27, 2022
8d9d21f
Added Cloudflare DNS
Cellularhacker Aug 27, 2022
99070d0
Changed README.md
Cellularhacker Aug 27, 2022
1ae59e5
Added CLI Mode run example
Cellularhacker Aug 27, 2022
38a9fbb
Added extract_hostnames
Cellularhacker Aug 27, 2022
f09eea9
Merge pull request #1 from Cellularhacker/controller/v2
Cellularhacker Aug 27, 2022
b2e8e53
Updated dependencies
Cellularhacker Oct 3, 2022
e1c914d
Updated .gitignore
Cellularhacker Oct 15, 2022
ded266e
Updated dependencies
Cellularhacker Oct 15, 2022
8c27d40
Updated dependency packages
Cellularhacker Oct 21, 2022
c8bd55b
Updated dependency packages
Cellularhacker Nov 13, 2022
d563548
Updated dependency packages
Cellularhacker Dec 12, 2022
d77fe42
Updated dependency packages
Cellularhacker Jan 10, 2023
74435f5
Upgrading to go version 1.21.0 - 1 of 2 stage
Cellularhacker Aug 22, 2023
29d60fb
Updated dependency packages
Cellularhacker Aug 22, 2023
16bcb98
Updated dependency packages
Cellularhacker Feb 2, 2024
3f3ce03
Updated dependency packages
Cellularhacker Feb 14, 2024
e168d3f
Updated dependency packages
Cellularhacker Jul 25, 2024
d93fb3c
Merge pull request #3 from Cellularhacker/controller/v2
Cellularhacker Jul 25, 2024
bb71b56
Updated dependency packages
Cellularhacker Sep 27, 2024
3c0da90
Updated dependency packages
Cellularhacker Oct 1, 2024
d1580e0
Updated dependency packages
Cellularhacker Oct 1, 2024
65c8ae2
Merge pull request #4 from Cellularhacker/dev
Cellularhacker Oct 1, 2024
00399fe
Updated dependency packages
Cellularhacker Oct 1, 2024
918d9f4
Merge pull request #5 from Cellularhacker/dev
Cellularhacker Oct 1, 2024
663afbb
Updated README.md
Cellularhacker Oct 1, 2024
a34fd23
Added codeql.yml
Cellularhacker Oct 1, 2024
40e9f75
Added SECURITY.md
Cellularhacker Oct 1, 2024
497bfa4
Merge pull request #6 from Cellularhacker/dev
Cellularhacker Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Test

on:
push:
branches:
- dev

jobs:
build:
name: Build check - dev
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup go with cache
uses: magnetikonline/action-golang-cache@v5
with:
go-version-file: go.mod
- run: go version
- name: Extract build target module name.
run: echo "BUILD_FILE_NAME=$(head -n1 go.mod | cut -d ' ' -f2)" >> $GITHUB_ENV
- name: Fetch Dependencies
run: go get
- name: Build test
run: go build -v ${{ env.BUILD_FILE_NAME }}
- name: if fail
uses: actions/github-script@v7
with:
github-token: ${{github.token}}
script: |
const ref = "${{github.ref}}"
const pull_number = Number(ref.split("/")[2])
await github.pulls.createReview({
...context.repo,
pull_number,
body:"Failed to build. ",
event: "REQUEST_CHANGES"
})
await github.pulls.update({
...context.repo,
pull_number,
state: "open"
})
if: failure()
92 changes: 92 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '21 2 * * 6'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: go
build-mode: autobuild
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject

.idea/
.vscode
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,27 @@ What can one expect in namebench 2.0?

BUILDING:
=========
Building requires Go 1.2 to be installed: http://golang.org/
Building requires Go 1.23.1 to be installed: http://golang.org/

* Create a workspace directory, and cd into it.
* Prepare your workspace directory:

```
export GOPATH=`pwd`
git clone https://github.com/google/namebench.git src/github.com/google/namebench
go get github.com/mattn/go-sqlite3
go get golang.org/x/net/publicsuffix
go get github.com/miekg/dns
```shell
go get
```

* Build it.

```
cd src/github.com/google/namebench
go build namebench.go
```shell
go build namebench
```

You should have an executable named 'namebench' in the current directory.


RUNNING:
========
* CLI mode: (go run) namebench --mode now --join_string '\t' --dns_filter 0

* End-user: run ./namebench, which should open up a UI window.
* Developer, run ./namebench_dev_server.sh for an auto-reloading webserver at http://localhost:9080/
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
packages=$(grep -hr "^package" */*.go | sort -u | cut -d" " -f2 | sed s/"^"/"\.\.\."/ | xargs)
echo "Rebuilding $packages"
go install $packages
go install "$packages"
26 changes: 0 additions & 26 deletions dnschecks/dnschecks.go

This file was deleted.

128 changes: 0 additions & 128 deletions dnsqueue/dnsqueue.go

This file was deleted.

Loading