Skip to content

Commit

Permalink
NF: Add GZIP_HEADER_DATA issue, following bids-standardgh-1349 (bids-…
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies authored Dec 1, 2022
1 parent 932a371 commit a1c7dfc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/schema/meta/context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,19 @@ context:
json:
description: 'Contents of the current JSON file'
type: object
gzip:
description: 'Parsed contents of gzip header'
type: object
properties:
timestamp:
description: 'Modification time, unix timestamp'
type: number
filename:
description: 'File name'
type: string
comment:
description: 'Comment'
type: string
nifti_header:
name: 'NIfTI Header'
description: 'Parsed contents of NIfTI header referenced elsewhere in schema.'
Expand Down
15 changes: 15 additions & 0 deletions src/schema/rules/checks/privacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
GzipHeaderFields:
issue:
code: GZIP_HEADER_DATA
message: |
The gzip header contains a non-zero timestamp or a non-empty filename
and/or comment field. These may leak sensitive information or indicate
a non-reproducible conversion process.
level: warning
selectors:
- match(extension, ".gz$")
checks:
- gzip.timestamp == 0
- gzip.filename == ""
- gzip.comment == ""

0 comments on commit a1c7dfc

Please sign in to comment.