Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[*]
insert_final_newline = true

# Override for Makefile
[{Makefile,makefile,GNUmakefile}]
indent_style = tab
indent_size = 4

[Makefile.*]
indent_style = tab
indent_size = 4

[*.md]
indent_style = space
indent_size = 2

[*.sh]
indent_style = tab
indent_size = 2
185 changes: 35 additions & 150 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,161 +1,46 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Distribution / packaging
.Python
.DS_Store
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/
# Test binary, built with `go test -c`
*.test

# Jupyter Notebook
.ipynb_checkpoints
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# IPython
profile_default/
ipython_config.py
# Dependency directories (remove the comment below to include it)
# vendor/

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# Go workspace file
go.work
.vscode/

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# Module directory
.terraform
**/.idea
**/*.iml

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json
**/build
**/dist
**/.helmfile/
.DS_Store
/variant
*.tar
*.gz
/bin

# Pyre type checker
.pyre/
# Nix
.envrc
.direnv/

# pytype static type analyzer
.pytype/
# ScrapNGo specific
ScrapNGo.txt

# Cython debug symbols
cython_debug/
dist/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
3 changes: 3 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
brew "go"
brew "gofumpt"
brew "exiftool"
1 change: 1 addition & 0 deletions FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: rosesecurity
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
BINARY_NAME=scrapNGo
VERSION=local
GO=go

default: help

help: ## List Makefile targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

all: build

fmt: ## Format Go files
gofumpt -w .

build: ## Build ScrapNGo
env $(if $(GOOS),GOOS=$(GOOS)) $(if $(GOARCH),GOARCH=$(GOARCH)) $(GO) build -o build/$(BINARY_NAME) -ldflags "-X 'github.com/RoseSecurity/ScrapNGo/cmd.Version=${VERSION}'" main.go

deps: ## Download dependencies
go mod download

get: ## Install dependencies
go get

clean: ## Clean up build artifacts
$(GO) clean
rm ./build/$(BINARY_NAME)

testacc: ## Run acceptance tests
go test ./...

run: build ## Run ScrapNGo
./build/$(BINARY_NAME)

docs: build ## Generate documentation
./build/$(BINARY_NAME) docs

version: build ## View binary version
chmod +x ./build/$(BINARY_NAME)
./build/$(BINARY_NAME) version

.PHONY: all build install clean run fmt help
29 changes: 29 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Security Policy

## Reporting a Vulnerability

If you believe you have found a security vulnerability in any repository owned by RoseSecurity, please let me know straight away. I will investigate all legitimate reports and do my best to quickly fix the problem.

### What to Include in Your Report

To help me better understand the nature and scope of the issue, please include as much of the following information as possible in your report:

- Description of the vulnerability and its potential impact.
- Step-by-step instructions to reproduce the issue.
- Affected versions and configurations.
- Any possible mitigations or workarounds that you have identified.

### What to Expect

> [!NOTE]
> **Bug Bounties**
>
> RoseSecurity **does not** provide bug bounties for vulnerability disclosures.
>
> As an open-source contributor, I release projects for free under a permissive license, encouraging community contributions.
>

After you submit a report, I will:
- Respond to your report within 48 hours to acknowledge receipt.
- Provide an estimated time frame for addressing the vulnerability.
- Notify you when the issue is resolved.
22 changes: 22 additions & 0 deletions cmd/docs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package cmd

import (
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
)

// Generate documentation for ScrapNGo commands and output to docs directory
var docsCmd = &cobra.Command{
Use: "docs",
Short: "Generate documentation for the CLI",
SilenceUsage: true,
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {
err := doc.GenMarkdownTree(cmd.Root(), "./docs")
if err != nil {
return err
}

return nil
},
}
Loading
Loading