Commit graph

32 commits

Author SHA1 Message Date
Tyler Chambers b6121edf70 swapped "is" for "==" in literal comparison
update lint-python.sh to include check F632
2020-11-09 10:21:51 -05:00
Wladimir J. van der Laan 65d0f1a533
devtools: Add security check for separate_code
Check that sections are appropriately separated in virtual memory,
based on their (expected) permissions. This checks for missing
-Wl,-z,separate-code and potentially other problems.

Co-authored-by: fanquake <fanquake@gmail.com>
2020-07-28 12:57:35 +08:00
fanquake eacedfb023
scripts: add additional type annotations to security-check.py 2020-05-14 15:30:52 +08:00
fanquake 83d063e954
scripts: add run_command to security-check.py
Deduplicate all the subprocess code as mentioned in 18713.
2020-05-14 15:29:58 +08:00
fanquake 13f606b4f9
scripts: remove NONFATAL from security-check.py 2020-05-14 14:36:27 +08:00
fanquake 061acf62a1
scripts: no-longer check for 32 bit windows in security-check.py 2020-05-14 14:36:27 +08:00
fanquake 3e38023af7
scripts: add PE .reloc section check to security-check.py 2020-04-23 08:40:24 +08:00
fanquake 7b99c7454c
scripts: add MACHO Canary check to security-check.py 2020-04-21 11:32:01 +08:00
fanquake 5ca90f8b59
scripts: add MACHO lazy bindings check to security-check.py 2020-04-04 09:54:25 +08:00
fanquake edaca2dd12
scripts: add MACHO NX check to security-check.py 2020-03-26 11:39:34 +08:00
MarcoFalke e09c701e01 scripted-diff: Bump copyright of files changed in 2020
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-01-15 02:18:00 +07:00
fanquake 7c9e821c4e
scripts: add MACHO NOUNDEFS check to security-check.py 2020-01-02 14:42:23 +08:00
fanquake 4ca92dc6d3
scripts: add MACHO PIE check to security-check.py 2020-01-02 14:42:21 +08:00
Craig Younkins af1ed206f8 Fix broken Gmane URLs 2018-11-30 13:51:55 +00:00
Wladimir J. van der Laan 78dae8cacc
Merge #13780: 0.17: Pre-branch maintenance
3fc20632a3 qt: Set BLOCK_CHAIN_SIZE = 220 (DrahtBot)
2b6a2f4a28 Regenerate manpages (DrahtBot)
eb7daf4d60 Update copyright headers to 2018 (DrahtBot)

Pull request description:

  Some trivial maintenance to avoid having to do it again after the 0.17 branch off.

  (The scripts to do this are in `./contrib/`)

Tree-SHA512: 16b2af45e0351b1c691c5311d48025dc6828079e98c2aa2e600dc5910ee8aa01858ca6c356538150dc46fe14c8819ed8ec8e4ec9a0f682b9950dd41bc50518fa
2018-08-08 13:55:27 +02:00
DrahtBot eb7daf4d60 Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
Chun Kuan Lee 1e60713a68 contrib: Fix test-security-check fail in Ubuntu 18.04 2018-07-26 17:10:13 +08:00
Conrado Gouvea 37d363dd4a
Tools: fix BIND_NOW check in security-check.py
Previously, the BIND_NOW check would work only if it was the first value in FLAGS.
2018-07-12 13:16:01 -03:00
John Bampton 0d31ef4762 Enable W191 and W291 flake8 checks.
Remove trailing whitespace from Python files.
Convert tabs to spaces.
2018-05-11 07:59:05 +10:00
John Newbery 5de2b18c67 [contrib] fixup security-check.py Python3 support 2018-03-28 15:46:54 -04:00
John Newbery bc6fdf2d15 Change all python files to use Python3 2018-03-26 16:49:33 -04:00
Akira Takizawa 595a7bab23 Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
practicalswift 25cd520fc4 Use sys.exit(...) instead of exit(...): exit(...) should not be used in programs 2017-08-28 15:18:14 +02:00
Wladimir J. van der Laan 4e1567acff
Merge #8249: Enable (and check for) 64-bit ASLR on Windows
62c2915 build: supply `-Wl,--high-entropy-va` (Wladimir J. van der Laan)
9a75d29 devtools: Check for high-entropy ASLR in 64-bit PE executables (Wladimir J. van der Laan)
2016-09-26 13:34:38 +02:00
Wladimir J. van der Laan 9a75d29b6f devtools: Check for high-entropy ASLR in 64-bit PE executables
check_PE_PIE only checked for DYNAMIC_BASE, this is not enough
for (secure) ASLR on 64-bit.
2016-09-26 12:57:55 +02:00
isle2983 4677b197f7 [copyright] add MIT License copyright header to remaining Python files 2016-09-11 16:21:01 -06:00
Matthew King 7b01ce254c Favour python over python2 as per PR #7723 2016-06-28 12:59:34 +03:00
Matthew King 873e81f89b Use portable #! in python scripts (/usr/bin/env) 2016-06-26 16:47:03 +03:00
Wladimir J. van der Laan 18f05c765c build: python 3 compatibility
Ubuntu 16.04 "xenial xerus" does not come with Python 2.x by default.
It is possible to install a python-2.7 package, but this has its own
problem: no `python` or `python2` symlink (see #7717).

This fixes the following scripts to work with python 3:
- `make check` (bctest,py, bitcoin-util-test.py)
- `make translate` (extract_strings_qt.py)
- `make symbols-check` (symbol-check.py)
- `make security-check` (security-check.py)

Explicitly call the python commands using $(PYTHON) instead
of relying on the interpreter line at the top of the scripts.
2016-03-29 17:20:16 +02:00
Cory Fields cd27bf51e0 release: fix parsing of BIND_NOW with older readelf 2016-01-26 23:07:04 -05:00
calebogden 0331aa350c Fixing typos on security-check.py and torcontrol.cpp 2016-01-08 13:31:42 -08:00
Wladimir J. van der Laan 579b863cd7 devtools: Add security-check.py
Perform the following ELF security checks:

- PIE: Check for position independent executable (PIE), allowing for address space randomization
- NX: Check that no sections are writable and executable (including the stack)
- RELRO: Check for read-only relocations, binding at startup
- Canary: Check for use of stack canary

Also add a check to symbol-check.py that checks that only the subset of
allowed libraries is imported (to avoid incompatibilities).
2015-10-22 03:35:38 +02:00