Skip to content

Commit 103000a

Browse files
committed
Bump version to 5.14.0 and update changelog with DMARCbis changes, bug fixes, and new tests
1 parent 12db14f commit 103000a

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## 5.14.0
4+
5+
### DMARCbis changes
6+
7+
- **New tags**: `np` (non-existent subdomain policy), `psd` (PSD flag), `t` (test mode) with descriptions, defaults, and validation
8+
- **Removed tag warnings**: `pct`, `rf`, `ri` descriptions appended with "Removed in DMARCbis." and emit warnings when explicitly present in a record
9+
- **Optional `p` tag**: Missing `p` now produces a warning and defaults to `none` instead of raising an error
10+
11+
```text
12+
"The p tag is optional in DMARCbis, but is required in older versions of DMARC."
13+
```
14+
15+
- **DNS tree walk**: `query_dmarc_record` replaces PSL-based `get_base_domain` lookup with the DMARCbis tree walk algorithm (walks parent domains one label at a time, with 8-label query limit optimization)
16+
17+
### Bug fixes
18+
19+
- **`dmarc.py``get_dmarc_tag_description`**: `allowed_values` was always `{}` — never populated from `dmarc_tags[tag]["values"]`, making value-specific descriptions dead code
20+
- **`dmarc.py``_query_dmarc_record`**: `f"The domain {0} does not exist.".format(domain)` mixed f-string with `.format()`, producing `"The domain 0 does not exist."` regardless of input
21+
- **`mta_sts.py``parse_mta_sts_policy`**: 4 missing `raise` keywords — exceptions for duplicate keys, invalid version, invalid mode, and non-integer max_age were instantiated but never raised, silently accepting invalid policies. Also fixed the duplicate key detection which incorrectly used the pre-populated `parsed_policy` dict (where defaults like `max_age: 0` were already present), replaced with a `seen_keys` set.
22+
- **`smtp_tls_reporting.py``parse_smtp_tls_reporting_record`**: Missing `raise` keyword — `SMTPTLSReportingSyntaxError` for a missing required `rua` tag was instantiated but never raised, silently allowing records without the required tag.
23+
24+
### Tests
25+
26+
92 new unit tests (153 total, up from 61) providing comprehensive coverage across all modules. Overall project test coverage improved from 45% to 58%.
27+
28+
- **`dmarc.py`** (60% → 82%): Tag descriptions, syntax errors, duplicate/invalid tags, pct edge cases, parked domain warnings, fo/rf/sp tag warnings, report URI parsing, record queries, DNS tree walk, `check_dmarc`
29+
- **`mta_sts.py`** (32% → 71%): Record/policy parsing, duplicate keys, invalid version/mode/max_age, missing keys, mx pattern matching
30+
- **`smtp_tls_reporting.py`** (38% → 69%): Record parsing, tag descriptions, invalid/duplicate tags, missing rua, HTTPS URIs
31+
- **`soa.py`** (43% → 89%): `soa_rname_to_email`, `parse_soa_string`, `check_soa`
32+
- **`__init__.py`** (21% → 54%): `results_to_json`, `results_to_csv_rows`, `check_ns`
33+
- **`spf.py`** (73% → 77%): `query_spf_record`, `check_spf`, parked domains, redirect macros, all mechanism variants
34+
- **`dnssec.py`** (16% → 28%): `test_dnssec` (mocked), DNSKEY cache
35+
336
## 5.13.4
437

538
### Improvements

checkdmarc/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
See the License for the specific language governing permissions and
2020
limitations under the License."""
2121

22-
__version__ = "5.13.4"
22+
__version__ = "5.14.0"
2323

2424
OS = platform.system()
2525
OS_RELEASE = platform.release()

0 commit comments

Comments
 (0)