From 396243d5e88fc4ef5c090ac68c691394da7fe05c Mon Sep 17 00:00:00 2001 From: Jussi-Pekka Erkkila Date: Fri, 25 Oct 2024 02:40:05 +0300 Subject: [PATCH] update pyproject.toml --- LICENSE | 4 ++-- README.md | 31 +++++++++++++++++++++++++------ pyproject.toml | 14 ++++++++++---- 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/LICENSE b/LICENSE index f8dc9fb..1e71688 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2016-2024 Jussi-Pekka Erkkila +Copyright (c) 2016 - 2024 Jussi-Pekka Erkkilä Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 8762688..b3dbd6e 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,13 @@ With minor modifications could be used as a library for other projects. The following assumes you have Python installed and command `python` refers to python version >= 3.8. -### Run without installation +### Install -1. Clone into repository -2. Run `python -m secheaders` +``` +$ pip install secheaders +``` -### Installation +### Building and running locally 1. Clone into repository 2. `python -m build` @@ -25,8 +26,13 @@ The following assumes you have Python installed and command `python` refers to 4. Run `secheaders --help` +### Running from source without installation + +1. Clone into repository +2. Run `python -m secheaders` + -### Usage +## Usage ``` $ secheaders --help usage: secheaders [-h] [--max-redirects N] [--insecure] [--verbose] URL @@ -44,7 +50,7 @@ options: ``` -### Example output +## Example output ``` $ secheaders example.com Header 'x-frame-options' is missing [ WARN ] @@ -59,3 +65,16 @@ HTTPS supported [ OK ] HTTPS valid certificate [ OK ] HTTP -> HTTPS automatic redirect [ WARN ] ``` + +## Design principles + +The following design principles have been considered: + +* Simplicity of the codebase. + * The code should be easy to understand and follow without in-depth Python knowledge. +* Avoidance of external dependencies. + * The Python Standard Libary provides enough tools and libraries for quite many use cases. +* Unix philosophy in general + * *"Do one thing and do it well"* + +These are not rules set in stone, but should be revisited when doing big design choices. diff --git a/pyproject.toml b/pyproject.toml index e760f9e..273fd11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,20 @@ [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "secheaders" version = "0.1.0" -requires-python = ">=3.4" +requires-python = ">=3.8" authors = [ {name = "Jussi-Pekka Erkkilä", email = "jp.erkkila@gmail.com"}, ] maintainers = [ {name = "Jussi-Pekka Erkkilä", email = "jp.erkkila@gmail.com"} ] + description = "Scan HTTP security headers" readme = "README.md" -license = {file = "LICENSE"} keywords = ["web", "security"] classifiers = [ "Development Status :: 4 - Beta", @@ -26,6 +26,12 @@ classifiers = [ "Topic :: Security", ] +[project.urls] +Homepage = "https://github.com/juerkkil/secheaders" +Issues = "https://github.com/juerkkil/secheaders/issues" +Repository = "https://github.com/juerkkil/secheaders" + + [project.scripts] secheaders = "secheaders.securityheaders:main"