head	1.1;
branch	1.1.1;
access;
symbols
	perseant-exfatfs:1.1.1.1.0.2
	perseant-exfatfs-base-20261102:1.1.1.1
	FILE5_48:1.1.1.1
	CHRISTOS:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2026.06.10.15.59.14;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	3UWc0DrzTz7bHgJG;

1.1.1.1
date	2026.06.10.15.59.14;	author christos;	state Exp;
branches
	1.1.1.1.2.1;
next	;
commitid	3UWc0DrzTz7bHgJG;

1.1.1.1.2.1
date	2026.06.10.15.59.14;	author perseant;	state dead;
branches;
next	1.1.1.1.2.2;
commitid	3QTNojfCEH9lUb2H;

1.1.1.1.2.2
date	2026.11.04.22.37.42;	author perseant;	state Exp;
branches;
next	;
commitid	3QTNojfCEH9lUb2H;


desc
@@


1.1
log
@Initial revision
@
text
@
#------------------------------------------------------------------------------
# $File: k9,v 1.1 2026/03/20 13:59:12 christos Exp $
# k9:  file(1) magic for K9 Self-Validating Components
# URL:  https://github.com/hyperpolymath/k9-svc
# From: Jonathan D.A. Jewell <j.d.a.jewell@@open.ac.uk>

# K9 files are self-validating components using the must-just-nickel triad.
# They begin with the ASCII magic number "K9!" (0x4B 0x39 0x21) and use a
# tiered security model: Kennel (data only), Yard (validation), Hunt (full
# execution with cryptographic signature).
# Specification: https://github.com/hyperpolymath/standards/blob/main/k9-svc/SPEC.adoc
# MIME type: application/vnd.k9+nickel

# K9 magic number: "K9!" at byte offset 0
0	string	K9!	K9 Self-Validating Component
!:mime	application/vnd.k9+nickel
!:ext	k9

# Detect security level from content following the magic number
>&0	search/1024	security_level:\ 'Kennel	K9 Self-Validating Component (Kennel level, data only)

>&0	search/1024	security_level:\ 'Yard	K9 Self-Validating Component (Yard level, validation)

>&0	search/1024	security_level:\ 'Hunt	K9 Self-Validating Component (Hunt level, executable)

# K9 Nickel contract files (.k9.ncl) -- pedigree definition
0	search/256	K9Pedigree	K9 Nickel contract (pedigree definition)
!:mime	application/vnd.k9+nickel
!:ext	k9.ncl/ncl
!:strength -10
@


1.1.1.1
log
@Import file-5.48 (previous was file-5.45)

2026-05-07  11:32  Christos Zoulas <christos@@zoulas.com>

	* release 5.48

2026-05-11  15:55 Christos Zoulas <christos@@zoulas.com>

	* add landlock support (valoq)

2026-04-19  15:55 Christos Zoulas <christos@@zoulas.com>

	* add BE/LE GUID

2026-04-17  11:05 Christos Zoulas <christos@@zoulas.com>

	* multiple fixes to prevent integer overflow in 32 bits (kerwin)

2026-04-15  12:40 Christos Zoulas <christos@@zoulas.com>

	* PR/745: streamout: Don't flush when trying to set negative offsets
	          on pipes, just continue, fixes 'cat file.zip | file -'
	* PR/753: vmihalko: Fix race is magic_getpath()

2026-03-11  15:14 Christos Zoulas <christos@@zoulas.com>

	* PR/728: Anton Monroe: Reinstate regex/c

2026-02-26  11:32  Christos Zoulas <christos@@zoulas.com>

	* release 5.47

2026-02-04  09:54  Christos Zoulas <christos@@zoulas.com>
	* Better multi-compound document identification by following the
	  order of the directories entries. (Thomas Ledoux)

2026-01-19  14:00  Christos Zoulas <christos@@zoulas.com>
	* if stat fails, don't attempt to restore times (Steven Grubb)

2025-05-28  15:20  Christos Zoulas <christos@@zoulas.com>

	* PR/622: Odd_Bloke: Handle negative offsets in file_buffer(),
	  when fd is not available.

2025-05-28  12:50  Christos Zoulas <christos@@zoulas.com>

	* PR/655: jsummers: Obey str_flags in strings like we do for search
	  and regex
	* PR/659: Pitzl: Apply MAGIC_CONTINUE to annotations; i.e. print
	  only the first, unless -k is specified.

2024-12-19  14:44  Christos Zoulas <christos@@zoulas.com>

	* PR/592: allow + in format strings
	* PR/592: signed operations should be done in signed context

2024-12-05  13:50 Christos Zoulas <christos@@zoulas.com>

	* PR/578: jsummers: Don't crash on cygwin when tm_mon == -1
	* PR/579: net147: Fix stack overrun.

2024-11-27  14:44  Christos Zoulas <christos@@zoulas.com>

	* release 5.46
	* Add OFFPOSITIVE

2024-11-25  13:56  Christos Zoulas <christos@@zoulas.com>

	* avoid leaking symbols in libmagic

2024-11-10  13:56  Christos Zoulas <christos@@zoulas.com>

	* PR/562: jsummers: Search/regex offsets are absolute to the
	  beginning of the file, so adjust them by subtracting the
	  offset that the "use" starts so that we don't double-count it.


2024-11-09  19:30  Christos Zoulas <christos@@zoulas.com>
 	* PR/543: matshch: bump nbuf so we can get the flags into the buffer.


2024-11-02  14:34  Christos Zoulas <christos@@zoulas.com>

 	* Add Android elf notes (enh)

2023-12-29  12:55  Christos Zoulas <christos@@zoulas.com>

	* Add limit for number of magic warnings allowed

2023-07-29  12:55  Christos Zoulas <christos@@zoulas.com>

	* check regex bounds (found by clusterfuzz)
@
text
@@


1.1.1.1.2.1
log
@file k9 was added on branch perseant-exfatfs on 2026-11-04 22:37:42 +0000
@
text
@d1 31
@


1.1.1.1.2.2
log
@Sync with HEAD
@
text
@a0 31

#------------------------------------------------------------------------------
# $File: k9,v 1.1 2026/03/20 13:59:12 christos Exp $
# k9:  file(1) magic for K9 Self-Validating Components
# URL:  https://github.com/hyperpolymath/k9-svc
# From: Jonathan D.A. Jewell <j.d.a.jewell@@open.ac.uk>

# K9 files are self-validating components using the must-just-nickel triad.
# They begin with the ASCII magic number "K9!" (0x4B 0x39 0x21) and use a
# tiered security model: Kennel (data only), Yard (validation), Hunt (full
# execution with cryptographic signature).
# Specification: https://github.com/hyperpolymath/standards/blob/main/k9-svc/SPEC.adoc
# MIME type: application/vnd.k9+nickel

# K9 magic number: "K9!" at byte offset 0
0	string	K9!	K9 Self-Validating Component
!:mime	application/vnd.k9+nickel
!:ext	k9

# Detect security level from content following the magic number
>&0	search/1024	security_level:\ 'Kennel	K9 Self-Validating Component (Kennel level, data only)

>&0	search/1024	security_level:\ 'Yard	K9 Self-Validating Component (Yard level, validation)

>&0	search/1024	security_level:\ 'Hunt	K9 Self-Validating Component (Hunt level, executable)

# K9 Nickel contract files (.k9.ncl) -- pedigree definition
0	search/256	K9Pedigree	K9 Nickel contract (pedigree definition)
!:mime	application/vnd.k9+nickel
!:ext	k9.ncl/ncl
!:strength -10
@


