From ac997cbf27604d618a149b7a75fbc84dac742b90 Mon Sep 17 00:00:00 2001 From: caffix Date: Sat, 12 Jul 2025 18:05:28 -0400 Subject: [PATCH] updated project files --- .codeclimate.yml | 3 --- .dockerignore | 25 ++++++++++++++++++++++--- .gitattributes | 1 - .github/workflows/docker.yml | 2 +- .github/workflows/go.yml | 14 +++++++------- .github/workflows/goreleaser.yml | 2 +- .github/workflows/lint.yml | 6 +++--- .gitignore | 5 +++++ .goreleaser.yaml | 7 +++---- CONTRIBUTING.md | 10 ++++++---- LICENSE | 4 ++-- README.md | 8 -------- codecov.yml | 6 +----- resources/config.yaml | 20 +++++++++++++++++++- resources/datasources.yaml | 6 ------ 15 files changed, 70 insertions(+), 49 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 68beff41..7be09d38 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -31,7 +31,4 @@ checks: config: threshold: 10 exclude_patterns: -- "doc/" -- "examples/" -- "images/" - "resources/" \ No newline at end of file diff --git a/.dockerignore b/.dockerignore index 96b226e7..8a64e4a3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,24 @@ Dockerfile *.md -images/* -examples/* -.idea \ No newline at end of file +.idea +*.json +*.log +*.html +*.test +*.out +.glide/ +*.exe +*.dll +*.so +*.dylib +*.zip +*.tar +*.tar.gz +*.tar.bz2 +*.tar.xz +*.tgz +*.rar +*.7z +*.gz +*.bz2 +*.xz \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 36e9d08a..a0717e4b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -*.ads linguist-language=Lua *.go text eol=lf \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c7d18fa3..e601cd55 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: ./ file: ./Dockerfile diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6dec9df7..3649f0a0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,7 +2,7 @@ name: tests on: push: - branches: [ "master", "develop" ] + branches: [ "main", "develop" ] pull_request: branches: develop @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] - go-version: [ "1.24.0" ] + go-version: [ "1.24.4" ] runs-on: ${{ matrix.os }} steps: - @@ -25,15 +25,15 @@ jobs: uses: actions/checkout@v4 - name: simple test - run: go test -v ./... + run: CGO_ENABLED=0 go test -v ./... - name: test with GC pressure - run: go test -v ./... + run: CGO_ENABLED=0 go test -v ./... env: GOGC: 1 - name: test with race detector - run: go test -v -race ./... + run: CGO_ENABLED=0 go test -v -race ./... coverage: name: Coverage runs-on: ubuntu-latest @@ -41,11 +41,11 @@ jobs: - name: setup Go uses: actions/setup-go@v5 with: - go-version: 1.24.0 + go-version: 1.24.4 - name: checkout uses: actions/checkout@v4 - name: measure coverage - run: go test -v -coverprofile=coverage.out ./... + run: CGO_ENABLED=0 go test -v -coverprofile=coverage.out ./... - name: report coverage run: | bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 6af8d3dc..82bc4e7d 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -21,7 +21,7 @@ jobs: name: set up Go uses: actions/setup-go@v5 with: - go-version: 1.24.0 + go-version: 1.24.4 - name: set up CycloneDX uses: CycloneDX/gh-gomod-generate-sbom@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ba92c3fa..29c4c832 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] - go-version: [ "1.24.0" ] + go-version: [ "1.24.4" ] runs-on: ${{ matrix.os }} steps: - @@ -23,8 +23,8 @@ jobs: uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v8 with: version: latest - args: --timeout=30m + args: --timeout=60m only-new-issues: true diff --git a/.gitignore b/.gitignore index b77e2dcc..bc53bda9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,11 @@ *.so *.dylib +# Output from Amass tooling +*.json +*.log +*.html + # Test binary, build with `go test -c` *.test diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 6ca9b532..c8132a19 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -33,8 +33,7 @@ builds: goarch: arm hooks: pre: - - go install github.com/owasp-amass/engine@master - - cp {{ .Env.HOME }}/go/bin/amass_engine ./resources/amass_engine + - CGO_ENABLED=0 go install github.com/owasp-amass/engine@main archives: - @@ -49,8 +48,8 @@ archives: files: - LICENSE - README.md - - examples/config.yaml - - examples/datasources.yaml + - resources/config.yaml + - resources/datasources.yaml sboms: - documents: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9316d6a6..47f19403 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,13 @@ # Contributing -Thank you for considering making contributions to Amass! Start by taking a look at the [open issues](https://github.com/owasp-amass/amass/issues) for things we need help with! +Thank you for considering making contributions to the OWASP Amass Project! Start by joining our [Discord server](https://discord.gg/ANTyEDUXt5), taking a look at the [Documentation](https://owasp-amass.github.io/docs/), and checking out the [open issues](https://github.com/owasp-amass/amass/issues) for things we need help with! Please follow standard github best practices: fork the repo, branch from the tip of develop, make some commits, and submit a pull request to develop. Please make sure to use `gofmt` before every commit - the easiest way to do this is have your editor run it for you upon saving a file. Otherwise, run the following command in the project root directory: `go fmt ./...` +It is recommended that you use the Golang Linter before every commit, to help you catch errors and to write clean code: `golangci-lint run ./...` + ## Forking Please note that Go requires code to live under absolute paths, which complicates forking. @@ -22,15 +24,15 @@ For instance, to create a fork and work on a branch of it, user 'foo' would: * `git remote add origin git@github.com:foo/amass.git` Now `origin` refers to the foo fork and `upstream` refers to the OWASP version. -So foo can `git push -u origin master` to update his/her fork, and make pull requests to OWASP from there. +So foo can `git push -u origin develop` to update his/her fork, and make pull requests to OWASP from there. Of course, replace `foo` with your git handle. To pull in updates from the original repo, run * `git fetch upstream` - * `git rebase upstream/master` (or whatever branch you want) + * `git rebase upstream/main` (or whatever branch you want) -Please don't make Pull Requests to `master`. +Please do not make pull requests to `main`. ### Development Procedure: - the latest state of development is on `develop` diff --git a/LICENSE b/LICENSE index af9e4e60..6dd4ba49 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2017 Jeff Foley. All rights reserved. +Copyright 2017-2025 Jeff Foley. All rights reserved. License: Apache2.0 @@ -190,7 +190,7 @@ License: Apache2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2017 Jeff Foley + Copyright 2017-2025 Jeff Foley Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 8b947c61..c9ab86e9 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,6 @@ The OWASP Amass Project performs network mapping of attack surfaces and external > You can find additional installation instructions and documentation in the [Amass Docs](https://owasp-amass.github.io/docs) repo. -### Docker Compose - -1. Install [Docker](https://www.docker.com) with Docker Compose -2. Clone the [Amass Docker Compose](https://github.com/owasp-amass/amass-docker-compose) onto your host: `git clone https://github.com/owasp-amass/amass-docker-compose.git` -3. Consider changing the name of the directory: `mv amass-docker-compose amass` -4. Execute your enumeration from within the directory: `docker compose run --rm amass enum -active -d example.com` -5. Go to the Amass Docker Compose repo, or the [Amass Docs](https://owasp-amass.github.io/docs) repo, for additional instructions - ## Corporate Supporters [![WhoisXML API Logo](https://raw.githubusercontent.com/owasp-amass/docs/master/images/supporters/whoisxmlapi_logo.png)](https://www.whoisxmlapi.com/) diff --git a/codecov.yml b/codecov.yml index 64927c64..81e16ff6 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,13 +2,9 @@ codecov: disable_default_path_fixes: yes fixes: - - "github.com/owasp-amass/amass/v4/::github.com/owasp-amass/amass/" + - "github.com/owasp-amass/amass/v5/::github.com/owasp-amass/amass/" ignore: - - encode_optype.go - - ./doc/**/* - - ./examples/**/* - - ./images/**/* - ./resources/**/* coverage: diff --git a/resources/config.yaml b/resources/config.yaml index def48607..2c918a29 100644 --- a/resources/config.yaml +++ b/resources/config.yaml @@ -32,31 +32,49 @@ options: wordlists: # wordlist(s) specific to name alterations - "./alterations.txt" default_transform_values: - ttl: 10080 # minutes. If not specified, the default is 1440 minutes (1 day) + ttl: 1440 # minutes. If not specified, the default is 1440 minutes (1 day) confidence: 50 # 50% priority: 5 transformations: Account->ALL: + ttl: 1080 # 7 days AutnumRecord->ALL: AutonomousSystem->ALL: + AutonomousSystem->RDAP: + ttl: 43200 # 30 days ContactRecord->ALL: DomainRecord->ALL: File->ALL: FQDN->ALL: FQDN->DNS: ttl: 1440 + FQDN->DomainRecord: + ttl: 43200 # 30 days FundsTransfer->ALL: + ttl: 1080 # 7 days Identifier->ALL: + Identifier->GLEIF: + ttl: 43200 # 30 days + Identifier->RDAP: + ttl: 43200 # 30 days IPAddress->ALL: IPNetRecord->ALL: Location->ALL: Netblock->ALL: + Netblock->RDAP: + ttl: 43200 # 30 days Organization->ALL: + Organization->GLEIF: + ttl: 43200 # 30 days Person->ALL: + ttl: 43200 # 30 days Phone->ALL: + ttl: 1080 # 7 days Product->ALL: + ttl: 10080 # 7 days ProductRelease->ALL: Service->ALL: TLSCertificate->ALL: + ttl: 10080 # 7 days URL->ALL: diff --git a/resources/datasources.yaml b/resources/datasources.yaml index aa4d04a6..77a56548 100644 --- a/resources/datasources.yaml +++ b/resources/datasources.yaml @@ -52,12 +52,6 @@ datasources: # apikey: null # account2: # apikey: null -# - name: Censys -# ttl: 10080 -# creds: -# account: -# apikey: null -# secret: null # - name: Chaos # ttl: 4320 # creds: