Skip to content

Commit

Permalink
update pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
juerkkil committed Oct 25, 2024
1 parent 73b4b77 commit d4b3725
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 27 deletions.
22 changes: 5 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
The MIT License (MIT)
MIT License

Copyright (c) 2016-2024 Jussi-Pekka Erkkila
Copyright (c) 2016-present Jussi-Pekka Erkkilä <[email protected]>>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ 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`
3. `pip install dist/secheaders-0.1.0-py3-none-any.whl`
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
Expand All @@ -44,7 +50,7 @@ options:
```


### Example output
## Example output
```
$ secheaders example.com
Header 'x-frame-options' is missing [ WARN ]
Expand All @@ -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 the 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.
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"},
]
maintainers = [
{name = "Jussi-Pekka Erkkilä", email = "[email protected]"}
]

description = "Scan HTTP security headers"
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["web", "security"]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -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"

0 comments on commit d4b3725

Please sign in to comment.