diff --git a/.github/ci-image/Dockerfile b/.github/ci-image/Dockerfile
index 4d4bcf9d..e6e8be37 100644
--- a/.github/ci-image/Dockerfile
+++ b/.github/ci-image/Dockerfile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# Image de CI préconstruite de Netcross (issue #968).
#
# Regroupe les paquets apt que les jobs en conteneur de ci.yml (quality, gtk4,
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9babbb08..c35c004b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,12 +8,19 @@ et le projet adhère au [SemVer](https://semver.org/lang/fr/).
## [Unreleased]
### Ajouté
+- Journaux de flux au format Zeek `conn.log` (#1115) : `--zeek-conn FICHIER` écrit une ligne par connexion et par point, colonnes Zeek standard (`#fields`/`#types`, lisible par `zeek-cut`) puis colonnes `netcross_*` (segment, latence et pertes par segment avec `--order`) ; `--zeek-format json` pour un objet par ligne. Respecte `--redact`. Voir docs/zeek-export.md.
- Image de CI préconstruite (#968, étape 1) : `.github/ci-image/Dockerfile` (paquets apt des jobs `quality`, `gtk4` et
`packaging`) et workflow `ci-image.yml`. L'image est construite sur chaque PR qui la modifie, puis poussée vers
`ghcr.io/mathilde-team/netcross-ci:26.04` à chaque modification fusionnée dans `dev`, chaque lundi (mises à jour de
sécurité) et à la demande. `ci.yml` basculera dessus dans une seconde PR, une fois l'image publiée.
### Modifié
+- Licence (#986) : passage de MIT à **GPL-3.0-or-later** — texte officiel
+ GPLv3 dans `LICENSE`, déclaration `license = "GPL-3.0-or-later"` dans
+ `pyproject.toml`, en-têtes `SPDX-License-Identifier` sur tous les
+ fichiers source (Python, scripts shell, Dockerfile), `debian/copyright`
+ ajouté (format machine-readable), spec RPM et README mis à jour
+ (compatibilité des dépendances documentée).
- Guide utilisateur (#465) : captures d'écran de l'interface GTK4 à jour (les quatre onglets et la cartographie, plus quatre nouvelles pour les fenêtres Outils de capture, Analyse d'un dossier, Documentation Lua et Historique des runs), prises sur la vraie interface par `tools/captures_ecran_gui.py`, qui les régénère.
- CI (#966) : un nouveau commit sur une PR annule le run du commit précédent (`concurrency`), dans `ci.yml` et `pr-coverage.yml`. Les runs `push` sur dev et main ne sont jamais annulés.
- Seuil de couverture bloquant porté à 95 % (#953, règle Mathilde-Team/.github#9) :
diff --git a/Dockerfile b/Dockerfile
index 4f462800..2e073104 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# Netcross — image Docker pour déploiement rapide (issue #170)
#
# Construction :
diff --git a/LICENSE b/LICENSE
index d23a4bb4..53d1f3d0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,675 @@
-MIT License
-
-Copyright (c) 2026 Mathilde Deuscher
-
-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 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.
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
+
diff --git a/README.md b/README.md
index 37aea51a..2fbd69e4 100644
--- a/README.md
+++ b/README.md
@@ -1359,6 +1359,18 @@ vers la branche `dev`. La branche `main` reste stable.
## Licence
-MIT — voir [LICENSE](LICENSE). Adresse de contact du mainteneur à compléter
-dans `LICENSE`, `build-deb/debian/control` et `build-rpm/netcross.spec`
-(actuellement `FIXME-mettre-votre-email@example.com`).
+GPL-3.0-or-later — voir [LICENSE](LICENSE) (texte officiel de la GNU General
+Public License, version 3 ou ultérieure).
+
+Historique de licence : le projet était précédemment distribué sous licence
+MIT — « Copyright (c) 2026 Mathilde Deuscher » — ; les versions publiées
+avant ce changement de licence restent couvertes par cette licence MIT.
+
+Dépendances (licences vérifiées dans les métadonnées des versions
+distribuées) : cryptography 50.0.1 (Apache-2.0 OR BSD-3-Clause),
+loguru (MIT), reportlab (BSD-3-Clause), matplotlib (licence Matplotlib,
+compatible BSD), networkx (BSD-3-Clause) — toutes compatibles avec la
+GPL-3.0-or-later ; `scikit-learn` (BSD-3-Clause) et `fastapi` (MIT) sont
+optionnelles et compatibles également. `tshark` (projet Wireshark,
+GPL-2.0-or-later) est appelé comme programme externe, sans liaison de
+code.
diff --git a/build-deb/build.sh b/build-deb/build.sh
index 28fe3cc4..3a80a5ed 100755
--- a/build-deb/build.sh
+++ b/build-deb/build.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
# build-deb/build.sh -- construit le paquet .deb de netcross.
#
# Le code source (src/) vit a la racine du depot, separement de
diff --git a/build-deb/debian/copyright b/build-deb/debian/copyright
new file mode 100644
index 00000000..cd07b9d1
--- /dev/null
+++ b/build-deb/debian/copyright
@@ -0,0 +1,16 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: netcross
+Source: https://github.com/Mathilde-Team/Netcross
+
+Files: *
+Copyright: 2026 Mathilde Deuscher <149895843+MathildeDec@users.noreply.github.com>
+License: GPL-3.0-or-later
+
+License: GPL-3.0-or-later
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation, either version 3 of the License, or (at your
+ option) any later version.
+ .
+ On Debian systems, the complete text of the GNU General Public License
+ version 3 can be found in /usr/share/common-licenses/GPL-3.
diff --git a/build-deb/debian/rules b/build-deb/debian/rules
index 2d33f6ac..6e46f304 100755
--- a/build-deb/debian/rules
+++ b/build-deb/debian/rules
@@ -1,4 +1,5 @@
#!/usr/bin/make -f
+# SPDX-License-Identifier: GPL-3.0-or-later
%:
dh $@
diff --git a/build-deb/wrappers/netcross b/build-deb/wrappers/netcross
index 42948e92..2aa3780f 100755
--- a/build-deb/wrappers/netcross
+++ b/build-deb/wrappers/netcross
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross par le paquet Debian/RPM.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
exec /usr/bin/python3 /usr/share/netcross/cross_capture_analyzer_cli.py "$@"
diff --git a/build-deb/wrappers/netcross-ai-models b/build-deb/wrappers/netcross-ai-models
index 89630685..d5232a32 100755
--- a/build-deb/wrappers/netcross-ai-models
+++ b/build-deb/wrappers/netcross-ai-models
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-ai-models par le paquet Debian/RPM.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
exec /usr/bin/python3 /usr/share/netcross/netcross_ai_models_cli.py "$@"
diff --git a/build-deb/wrappers/netcross-batch b/build-deb/wrappers/netcross-batch
index a7173817..f337c2c1 100755
--- a/build-deb/wrappers/netcross-batch
+++ b/build-deb/wrappers/netcross-batch
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-batch par le paquet Debian/RPM.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
exec /usr/bin/python3 /usr/share/netcross/cross_capture_batch_cli.py "$@"
diff --git a/build-deb/wrappers/netcross-diff b/build-deb/wrappers/netcross-diff
index 3f05b710..76bd7d86 100755
--- a/build-deb/wrappers/netcross-diff
+++ b/build-deb/wrappers/netcross-diff
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-diff par le paquet Debian/RPM.
# Comparaison avant/apres entre deux jeux de captures.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
diff --git a/build-deb/wrappers/netcross-gui b/build-deb/wrappers/netcross-gui
index 051216b2..15f23359 100755
--- a/build-deb/wrappers/netcross-gui
+++ b/build-deb/wrappers/netcross-gui
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-gui par le paquet Debian/RPM.
# Necessite les paquets python3-gi + gir1.2-gtk-4.0 (Debian/Ubuntu) ou
# python3-gobject + gtk4 (RHEL/Rocky) -- voir README.md.
diff --git a/build-deb/wrappers/netcross-history b/build-deb/wrappers/netcross-history
index 267711ab..cfdc80f8 100755
--- a/build-deb/wrappers/netcross-history
+++ b/build-deb/wrappers/netcross-history
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-history par le paquet Debian/RPM.
# Interrogation seule d'un historique --history-db, sans relancer d'analyse.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
diff --git a/build-deb/wrappers/netcross-lua-doc b/build-deb/wrappers/netcross-lua-doc
index 4e1b9b2e..59e5002f 100755
--- a/build-deb/wrappers/netcross-lua-doc
+++ b/build-deb/wrappers/netcross-lua-doc
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-lua-doc par le paquet Debian/RPM.
# Documentation hors ligne de l'API Lua Wireshark (issue #388) ; la banque
# SQLite est construite dans ~/.cache/netcross depuis /usr/share/netcross/data/lua_api.json.
diff --git a/build-rpm/build.sh b/build-rpm/build.sh
index 36ace1b8..2d4150bc 100755
--- a/build-rpm/build.sh
+++ b/build-rpm/build.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
# build-rpm/build.sh -- construit le paquet .rpm de netcross (Rocky 8/9,
# RHEL et derives).
#
@@ -31,6 +32,7 @@ rm -rf "$SCRIPT_DIR/_build"
mkdir -p "$STAGE_DIR"
mkdir -p "$TOPDIR"/{SOURCES,SPECS,BUILD,RPMS,SRPMS,BUILDROOT}
+cp "$REPO_ROOT/LICENSE" "$STAGE_DIR/"
cp -r "$REPO_ROOT/src/pcap_parser" "$STAGE_DIR/"
cp -r "$REPO_ROOT/src/netcross_core" "$STAGE_DIR/"
cp -r "$REPO_ROOT/src/netcross_report" "$STAGE_DIR/"
diff --git a/build-rpm/netcross.spec b/build-rpm/netcross.spec
index b1ac31ef..b02f12ed 100644
--- a/build-rpm/netcross.spec
+++ b/build-rpm/netcross.spec
@@ -2,7 +2,7 @@ Name: netcross
Version: 1.1.0
Release: 1%{?dist}
Summary: Analyse croisee de captures Wireshark multi-points
-License: MIT
+License: GPL-3.0-or-later
URL: https://github.com/Mathilde-Team/Netcross
BuildArch: noarch
@@ -67,6 +67,8 @@ cp cross_capture_batch_cli.py %{buildroot}%{_datadir}/netcross/
cp netcross_ai_models_cli.py %{buildroot}%{_datadir}/netcross/
cp netcross_lua_doc_cli.py %{buildroot}%{_datadir}/netcross/
cp netcross_annotations_cli.py %{buildroot}%{_datadir}/netcross/
+mkdir -p %{buildroot}%{_licensedir}/%{name}
+cp LICENSE %{buildroot}%{_licensedir}/%{name}/LICENSE
mkdir -p %{buildroot}%{_datadir}/netcross/data
cp data/lua_api.json %{buildroot}%{_datadir}/netcross/data/
cp data/lua_dissectors.csv %{buildroot}%{_datadir}/netcross/data/
@@ -82,6 +84,7 @@ install -m 755 netcross-ai-models-wrapper %{buildroot}%{_bindir}/netcross-ai-mod
install -m 755 netcross-lua-doc-wrapper %{buildroot}%{_bindir}/netcross-lua-doc
%files
+%license %{_licensedir}/%{name}/LICENSE
%{_datadir}/netcross/
%{_bindir}/netcross
%{_bindir}/netcross-gui
diff --git a/build-rpm/wrappers/netcross-ai-models-wrapper b/build-rpm/wrappers/netcross-ai-models-wrapper
index 89630685..d5232a32 100755
--- a/build-rpm/wrappers/netcross-ai-models-wrapper
+++ b/build-rpm/wrappers/netcross-ai-models-wrapper
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-ai-models par le paquet Debian/RPM.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
exec /usr/bin/python3 /usr/share/netcross/netcross_ai_models_cli.py "$@"
diff --git a/build-rpm/wrappers/netcross-batch-wrapper b/build-rpm/wrappers/netcross-batch-wrapper
index a7173817..f337c2c1 100755
--- a/build-rpm/wrappers/netcross-batch-wrapper
+++ b/build-rpm/wrappers/netcross-batch-wrapper
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-batch par le paquet Debian/RPM.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
exec /usr/bin/python3 /usr/share/netcross/cross_capture_batch_cli.py "$@"
diff --git a/build-rpm/wrappers/netcross-diff-wrapper b/build-rpm/wrappers/netcross-diff-wrapper
index 3f05b710..76bd7d86 100755
--- a/build-rpm/wrappers/netcross-diff-wrapper
+++ b/build-rpm/wrappers/netcross-diff-wrapper
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-diff par le paquet Debian/RPM.
# Comparaison avant/apres entre deux jeux de captures.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
diff --git a/build-rpm/wrappers/netcross-gui-wrapper b/build-rpm/wrappers/netcross-gui-wrapper
index bcda79ed..4b087826 100755
--- a/build-rpm/wrappers/netcross-gui-wrapper
+++ b/build-rpm/wrappers/netcross-gui-wrapper
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-gui par le paquet RPM.
# Necessite les paquets python3-gobject + gtk4 -- voir README.md pour la
# disponibilite selon la version de RHEL/Rocky.
diff --git a/build-rpm/wrappers/netcross-history-wrapper b/build-rpm/wrappers/netcross-history-wrapper
index 267711ab..cfdc80f8 100755
--- a/build-rpm/wrappers/netcross-history-wrapper
+++ b/build-rpm/wrappers/netcross-history-wrapper
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-history par le paquet Debian/RPM.
# Interrogation seule d'un historique --history-db, sans relancer d'analyse.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
diff --git a/build-rpm/wrappers/netcross-lua-doc-wrapper b/build-rpm/wrappers/netcross-lua-doc-wrapper
index 4e1b9b2e..59e5002f 100755
--- a/build-rpm/wrappers/netcross-lua-doc-wrapper
+++ b/build-rpm/wrappers/netcross-lua-doc-wrapper
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross-lua-doc par le paquet Debian/RPM.
# Documentation hors ligne de l'API Lua Wireshark (issue #388) ; la banque
# SQLite est construite dans ~/.cache/netcross depuis /usr/share/netcross/data/lua_api.json.
diff --git a/build-rpm/wrappers/netcross-wrapper b/build-rpm/wrappers/netcross-wrapper
index 4fc4f8b2..a793ece3 100755
--- a/build-rpm/wrappers/netcross-wrapper
+++ b/build-rpm/wrappers/netcross-wrapper
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# Wrapper installe dans /usr/bin/netcross par le paquet RPM.
export PYTHONPATH="/usr/share/netcross:${PYTHONPATH:-}"
exec /usr/bin/python3 /usr/share/netcross/cross_capture_analyzer_cli.py "$@"
diff --git a/docs/class-diagram.md b/docs/class-diagram.md
index 9abd1307..73863324 100644
--- a/docs/class-diagram.md
+++ b/docs/class-diagram.md
@@ -11,7 +11,7 @@
> Il remplace l'ancienne section 3 de `docs/features-backlog.md`, tenue à la main, qui avait dérivé
> (voir `docs/sessions/session-36.md`, issue #140).
-215 modules · 311 classes · 763 fonctions publiques de module.
+216 modules · 312 classes · 768 fonctions publiques de module.
Conventions : `+` public, `-` privé (préfixe `_`) ; `int?` = `int | None` ; `list~str~` = `list[str]` ;
`<>` regroupe les fonctions publiques d'un module ; `A --> B : champ` = `A` a un champ annoté
@@ -32,7 +32,7 @@ flowchart TD
netcross_ai["netcross_ai"]
netcross_core["netcross_core"]
pcap_parser["pcap_parser"]
- CLI -->|"24 imports"| netcross_report
+ CLI -->|"25 imports"| netcross_report
CLI -->|"8 imports"| netcross_ai
CLI -->|"55 imports"| netcross_core
CLI -->|"8 imports"| pcap_parser
@@ -44,7 +44,7 @@ flowchart TD
netcross_api -->|"5 imports"| netcross_ai
netcross_api -->|"55 imports"| netcross_core
netcross_api -->|"4 imports"| pcap_parser
- netcross_report -->|"44 imports"| netcross_core
+ netcross_report -->|"46 imports"| netcross_core
netcross_ai -->|"10 imports"| netcross_core
netcross_core -->|"23 imports"| pcap_parser
```
@@ -3785,6 +3785,7 @@ classDiagram
| `netcross_report.stix_export` | export STIX 2.1 des constats de securite (issue #279, sous-issue de #170). |
| `netcross_report.synthesis` | transforme un Report en une liste de constats (Finding) via des regles et seuils explicites. |
| `netcross_report.triage` | agrege les Finding (ou DiffFinding) produits par ailleurs pour repondre a une question que synthesis.py ne pose pas : "par ou je commence a regarder ?" |
+| `netcross_report.zeek_export` | journaux de flux au format Zeek ``conn.log`` (issue #1115, chantier #1003). |
### Diagramme
@@ -4299,6 +4300,47 @@ classDiagram
+format_health_line(score) str
}
+ %% ===== netcross_report.zeek_export =====
+ class ZeekConn {
+ <>
+ +str point
+ +str proto
+ +str orig_h
+ +int? orig_p
+ +str resp_h
+ +int? resp_p
+ +float ts
+ +float last_ts
+ +str uid
+ +str? service
+ +int orig_bytes
+ +int resp_bytes
+ +int orig_pkts
+ +int resp_pkts
+ +int orig_ip_bytes
+ +int resp_ip_bytes
+ +str conn_state
+ +str history
+ +tuple~str, ...~ points_seen
+ +str? segment
+ +float? segment_delay_ms
+ +int? segment_lost_pkts
+ +str? loss_segment
+ -set~str~ _orig_flags
+ -set~str~ _resp_flags
+ -bool _orig_data
+ -bool _resp_data
+ +values() dict~str, object~
+ }
+ class mod_netcross_report_zeek_export["netcross_report.zeek_export"] {
+ <>
+ +tcp_flag_names(flags) frozenset~str~
+ +build_conn_records(packets, points, points_order) list~ZeekConn~
+ +to_tsv(records) str
+ +to_json_lines(records) str
+ +write_zeek_conn(records, output_path, fmt) str
+ }
+
%% ===== relations =====
netcross_report_metric_charts_MetricSeries --> ComplianceZone : zones
netcross_report_metric_charts_MetricSeries --> Threshold : thresholds
diff --git a/docs/features-backlog.md b/docs/features-backlog.md
index cef79c0e..75fdeb09 100644
--- a/docs/features-backlog.md
+++ b/docs/features-backlog.md
@@ -4867,9 +4867,10 @@ les deux conditions ci-dessus, absentes dans le cas normal).
cet environnement ; `rpmbuild` lui-même absent depuis la Session 30.
- **`FIXME`/licence** — placeholders nécessitant les vraies coordonnées
du mainteneur (email, compte GitHub), non renseignables sans inventer
- une fausse information. `LICENSE` elle-même est déjà complète (MIT,
- nom et année présents, aucun placeholder) — seuls `debian/control`,
- `debian/changelog` et `netcross.spec` portent encore le FIXME.
+ une fausse information. `LICENSE` était alors complète (MIT, nom et
+ année présents, aucun placeholder) ; le projet est passé en
+ **GPL-3.0-or-later** (PR #989) et plus aucun FIXME de licence ne
+ subsiste dans `LICENSE`, `debian/control` ou `netcross.spec`.
- **Mesure du gain `--parallel` sur un hôte multi-cœurs réel** — le
mécanisme reste architecturalement sain (voir "Résultat mesuré"
ci-dessus) mais aucun hôte de ce type n'était disponible cette
diff --git a/docs/guide/exemples/generer_exemple.py b/docs/guide/exemples/generer_exemple.py
index 788faacf..4e325d15 100644
--- a/docs/guide/exemples/generer_exemple.py
+++ b/docs/guide/exemples/generer_exemple.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Régénère les captures d'exemple du guide utilisateur.
Scénario : un poste (10.0.0.5) ouvre trois connexions TCP vers un serveur
diff --git a/docs/parite-surfaces.md b/docs/parite-surfaces.md
index c490ab92..eac9a584 100644
--- a/docs/parite-surfaces.md
+++ b/docs/parite-surfaces.md
@@ -14,7 +14,7 @@ ici fait donc échouer la CI.
| Surface | Points d'entrée | Capacités |
|---|---|---|
-| CLI | `cross_capture_analyzer_cli.py` (128 options), `cross_capture_diff_cli.py` (28), `cross_capture_batch_cli.py` (11), `cross_history_cli.py`, `netcross_lua_doc_cli.py`, `netcross_ai_models_cli.py` | Surface de référence : tout y est |
+| CLI | `cross_capture_analyzer_cli.py` (130 options), `cross_capture_diff_cli.py` (28), `cross_capture_batch_cli.py` (11), `cross_history_cli.py`, `netcross_lua_doc_cli.py`, `netcross_ai_models_cli.py` | Surface de référence : tout y est |
| GUI | `netcross_gtk4` : 3 pages, 44 cases à cocher, 31 réglages numériques | Analyse interactive et exploration visuelle |
| API | 62 routes FastAPI | Analyse avec sécurité ; options NAT, TLS, QUIC, anonymisation ; exports texte, PDF, CSV (issue #670) ; options avancées (#672) ; comparaison baseline/courant (#669) ; recherche forensic, extraction, comparaison de postes, NetFlow (#675) |
@@ -97,6 +97,7 @@ actif, non réglable.
| Exploration statistique (Top-N, tri, regroupement, drill-down, export CSV/JSON) | oui (vue « Exploration statistique » : regroupement, tri, Top-N, sélection d'une ligne, « Exporter CSV/JSON ») | `--stats FICHIER` (CSV si `.csv`, JSON sinon), `--stats-group-by`, `--stats-sort`, `--stats-top-n`, `--stats-format` ; `flow_keys` de chaque ligne pour le drill-down (issue #912) | `GET /analyses/{analysis_id}/stats` : `group_by`, `sort`, `top_n`, `format` (`json` ou `csv` ; issue #912) |
| Cartographie des communications (qui parle à qui, anomalies en rouge) | oui (vue « Cartographie » : filtres protocole, Top-N, « Anomalies seulement ») | `--comm-map FICHIER` (DOT Graphviz si `.dot`/`.gv`, JSON sinon), `--comm-map-protocol`, `--comm-map-top-n`, `--comm-map-anomalies-only` (issue #909) | `GET /analyses/{analysis_id}/comm-map` : `protocol`, `top_n`, `anomalies_only`, `format` (`json` ou `dot` ; issue #909) |
| Export SIEM (CEF, LEEF, STIX) | oui (panneau « SIEM, ticket de support, historique » de la page Résultats, après un rapport de sécurité, même fichier ; issue #674) | `--siem-export`, `--siem-output` | `GET /analyses/{analysis_id}/siem` (issue #674), `format` |
+| Journaux de flux Zeek conn.log (TSV, JSON) | non | `--zeek-conn`, `--zeek-format` (issue #1115) | non |
| Historique SQLite | oui (« Historique... » et « Etiquette » de la configuration, derniers runs dans le panneau « SIEM, ticket de support, historique » ; issue #674) | `--history-db`, `--history-label`, `--history-show` ; `netcross-history` | `history`, `history_label` de `POST /captures` et `POST /captures/multi` (base fixée par `NETCROSS_HISTORY_DB`, `history_id` ou `history_error` dans le résumé ; issue #890), consultation `GET /history` ; persistance propre des analyses (`NETCROSS_DB_PATH`), `GET /analyses` |
| Ticket de support anonymisé | oui (case de consentement et « Ticket de support... » du panneau « SIEM, ticket de support, historique », ticket « diagnostic », toutes portées ; issue #674) | `--support-ticket`, `--support-consent`, `--support-scope`, `--support-map`, `--support-marker` | `POST /analyses/{analysis_id}/support-ticket` (issue #674), `consent`, `kind`, `scopes`, `marker`, `include_map` (issue #877) |
diff --git a/docs/zeek-export.md b/docs/zeek-export.md
new file mode 100644
index 00000000..dad2e946
--- /dev/null
+++ b/docs/zeek-export.md
@@ -0,0 +1,83 @@
+# Journaux de flux Zeek conn.log (issue #1115)
+
+Netcross écrit ses flux au format `conn.log` de [Zeek](https://docs.zeek.org/en/master/logs/conn.html),
+lisible par tout l'écosystème Zeek : `zeek-cut`, Splunk (TA Zeek), Elastic (module Zeek),
+RITA, Brim/Zui. Sous-issue 4/5 du chantier #1003 (export observabilité).
+
+```bash
+cross_capture_analyzer_cli.py --capture LAN=lan.pcapng --capture WAN=wan.pcapng \
+ --order LAN,WAN --zeek-conn conn.log
+zeek-cut ts id.orig_h id.resp_h conn_state netcross_segment_lost_pkts < conn.log
+
+# variante JSON (un objet par ligne, comme LogAscii::use_json=T)
+cross_capture_analyzer_cli.py --capture LAN=lan.pcapng --zeek-conn conn.json --zeek-format json
+```
+
+Module : `netcross_report.zeek_export` (`build_conn_records`, `to_tsv`, `to_json_lines`,
+`write_zeek_conn`).
+
+## Une ligne par connexion et par point
+
+Comme si Zeek avait tourné sur chaque sonde : une connexion vue en `LAN` et en `WAN` donne deux
+lignes, chacune avec les compteurs observés à son point. Une connexion est identifiée par le
+protocole et le couple de points d'extrémité (ICMP : couple d'adresses, type et code dans
+`id.orig_p`/`id.resp_p` comme Zeek). L'initiateur est l'émetteur du SYN sans ACK s'il est vu,
+sinon celui du premier paquet. ARP, STP et IP sans transport connu ne sont pas des connexions
+au sens de Zeek et sont ignorés, ainsi que les paquets marqués doublons.
+
+## Format TSV
+
+En-têtes Zeek complets : `#separator \x09`, `#set_separator ,`, `#empty_field (empty)`,
+`#unset_field -`, `#path conn`, `#open`, `#fields`, `#types`, puis une ligne par connexion et
+`#close`. `#open` et `#close` portent les bornes de la capture (premier et dernier paquet),
+pas l'heure de l'export : deux exports d'une même capture sont identiques octet pour octet.
+Tabulation, fins de ligne et antislash d'une valeur sont échappés en `\xNN`.
+
+Colonnes standard de Zeek, dans l'ordre de Zeek :
+
+| Colonne | Type | Valeur Netcross |
+|---|---|---|
+| `ts`, `duration` | `time`, `interval` | premier paquet au point, écart au dernier |
+| `uid` | `string` | `C` + 17 caractères base 62, stable d'un export à l'autre |
+| `id.orig_h`, `id.orig_p`, `id.resp_h`, `id.resp_p` | `addr`, `port` | initiateur et répondeur |
+| `proto` | `enum` | `tcp`, `udp`, `icmp` |
+| `service` | `string` | `dns`, `ssl`, `http`, `sip`, `dhcp`, `ssh` si un champ disséqué l'atteste |
+| `orig_bytes`, `resp_bytes` | `count` | charge utile observée |
+| `conn_state` | `string` | `S0`, `S1`, `SF`, `REJ`, `RSTO`, `RSTR`, `SH`, `OTH` |
+| `history` | `string` | lettres Zeek `S H A D F R` (majuscule : initiateur) |
+| `orig_pkts`, `resp_pkts`, `orig_ip_bytes`, `resp_ip_bytes` | `count` | paquets et longueur de trame |
+| `local_orig`, `local_resp`, `missed_bytes` | | non renseignés (`-`) |
+| `tunnel_parents` | `set[string]` | vide |
+
+Colonnes propres à Netcross, après les colonnes standard :
+
+| Colonne | Type | Signification |
+|---|---|---|
+| `netcross_point` | `string` | point de capture de la ligne |
+| `netcross_points` | `set[string]` | points qui voient la connexion, dans l'ordre `--order` |
+| `netcross_segment` | `string` | segment amont → point (`LAN->WAN`), avec `--order` |
+| `netcross_segment_delay_ms` | `double` | médiane des écarts entre les deux observations d'un même paquet |
+| `netcross_segment_lost_pkts` | `count` | paquets vus en amont et absents à ce point |
+| `netcross_loss_segment` | `string` | premier segment du chemin où la connexion perd des paquets |
+
+Sans `--order`, le chemin n'est pas connu : les colonnes de segment restent non renseignées.
+Les pertes suivent la convention du rapport : un paquet vu au point amont et absent au point
+de la ligne.
+
+## Format JSON
+
+Un objet par ligne, clés dans l'ordre des colonnes ; champs non renseignés et ensembles vides
+omis, ensembles en listes, `ts` en secondes flottantes.
+
+## Anonymisation
+
+Avec `--redact`, les paquets sont pseudonymisés avant l'analyse : adresses du `conn.log` et
+`uid` (dérivé des valeurs pseudonymisées) n'exposent aucune adresse réelle.
+
+## Limites
+
+- `orig_bytes`/`resp_bytes` additionnent la charge utile vue, retransmissions comprises (Zeek
+ les déduit des numéros de séquence) ; `*_ip_bytes` est la longueur de trame capturée.
+- `history` note chaque lettre une fois par sens, sans les répétitions de Zeek.
+- `service` ne s'appuie que sur la dissection, jamais sur le numéro de port.
+- `local_orig`, `local_resp` (réseaux locaux de Zeek) et `missed_bytes` ne sont pas calculés.
diff --git a/examples/plugins/detecteur_telnet.py b/examples/plugins/detecteur_telnet.py
index cc89f92c..d80d4d4c 100644
--- a/examples/plugins/detecteur_telnet.py
+++ b/examples/plugins/detecteur_telnet.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Plugin d'exemple Netcross (issue #284) : detecteur minimal.
diff --git a/install.sh b/install.sh
index a61fe0ac..e1f9f5c2 100755
--- a/install.sh
+++ b/install.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
# install.sh -- installe les dependances systeme de netcross.
#
# Utilise les paquets systeme (apt/dnf) plutot que pip quand ils existent :
diff --git a/mkdocs.yml b/mkdocs.yml
index 5143c371..4dcbdc62 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -74,6 +74,7 @@ nav:
- Estimation d'horloge: estimation-horloge.md
- Rapport de sécurité: security-report.md
- Export SIEM (CEF, LEEF, STIX): siem-export.md
+ - Journaux Zeek conn.log: zeek-export.md
- Notifications: notifications.md
- Plugins: plugins.md
- Empreintes JA4/HASSH: fingerprints-ja4-hassh.md
diff --git a/pyproject.toml b/pyproject.toml
index bbe611d9..6c46a4e2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,6 +3,7 @@ name = "netcross"
version = "1.1.0"
description = "Analyse croisee de captures reseau multi-points (pcap_parser/tshark, netcross_core, netcross_report, CLI, GUI GTK4)"
requires-python = ">=3.10"
+license = "GPL-3.0-or-later"
# >=3.10 (et non >=3.9, la cible historique de `ruff target-version`
# ci-dessous, qui ne fixe que la syntaxe autorisee, jamais l'interpreteur
# minimal d'execution) : import-linter>=2.13 (extra dev) exige lui-meme
diff --git a/scripts/__init__.py b/scripts/__init__.py
index e69de29b..31d49ed8 100644
--- a/scripts/__init__.py
+++ b/scripts/__init__.py
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/scripts/audit_debug_entrees.py b/scripts/audit_debug_entrees.py
index 7c87dab4..38ddfe6f 100755
--- a/scripts/audit_debug_entrees.py
+++ b/scripts/audit_debug_entrees.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Contrôle AST : une trace logger.debug() en entrée des fonctions éligibles.
Issue #954 : la consigne « debug() en entrée et à chaque sortie » doit aussi
diff --git a/scripts/audit_debug_sorties.py b/scripts/audit_debug_sorties.py
index 8d733729..be85afd3 100644
--- a/scripts/audit_debug_sorties.py
+++ b/scripts/audit_debug_sorties.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Contrôle AST : un logger.debug() avant chaque sortie de fonction.
Sortie = chaque ``return``, chaque ``raise`` et la fin implicite d'une
diff --git a/scripts/bench_datasets.py b/scripts/bench_datasets.py
index dda29886..6d998205 100755
--- a/scripts/bench_datasets.py
+++ b/scripts/bench_datasets.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""scripts/bench_datasets.py -- jeux pcapng multi-points déterministes (issue #1015).
Mince enveloppe autour de :func:`netcross_core.testing.synth.main` ; toute la
diff --git a/scripts/bench_memory.py b/scripts/bench_memory.py
index 3dad4054..2a614db5 100644
--- a/scripts/bench_memory.py
+++ b/scripts/bench_memory.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
scripts/bench_memory.py -- banc de mesure memoire pour de grosses captures
(issue #283, Etape 1 : "mesurer avant d'optimiser").
diff --git a/scripts/build_cve_seed.py b/scripts/build_cve_seed.py
index e22f08e3..2f6efffa 100644
--- a/scripts/build_cve_seed.py
+++ b/scripts/build_cve_seed.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
scripts/build_cve_seed.py -- regenere la base CVE minimale embarquee
(`src/netcross_core/data/cve_seed.json`, issue #353).
diff --git a/scripts/build_lua_db.py b/scripts/build_lua_db.py
index d121ab80..f516f614 100644
--- a/scripts/build_lua_db.py
+++ b/scripts/build_lua_db.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
scripts/build_lua_db.py -- charge le JSON de l'API Lua Wireshark (#386)
dans la banque SQLite locale (netcross_core.lua_doc), issue #387.
diff --git a/scripts/capture_reference_fingerprints.py b/scripts/capture_reference_fingerprints.py
index 83904d3d..9beedc72 100644
--- a/scripts/capture_reference_fingerprints.py
+++ b/scripts/capture_reference_fingerprints.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Peuple `known_fingerprints.json` avec de VRAIES empreintes JA4/HASSH
(issue #259), capturees sur la boucle locale et verifiees contre
diff --git a/scripts/check_branch_protection.py b/scripts/check_branch_protection.py
index 0735e2db..0f41e67b 100644
--- a/scripts/check_branch_protection.py
+++ b/scripts/check_branch_protection.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""check_branch_protection.py -- verifie la protection d'une branche (#334).
La regle de protection de ``dev`` est versionnee dans
diff --git a/scripts/generate_class_diagram.py b/scripts/generate_class_diagram.py
index aff58b82..2dcb4695 100644
--- a/scripts/generate_class_diagram.py
+++ b/scripts/generate_class_diagram.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
scripts/generate_class_diagram.py -- genere docs/class-diagram.md depuis le code.
diff --git a/scripts/generate_openapi.py b/scripts/generate_openapi.py
index 72d1c9dc..686d4387 100644
--- a/scripts/generate_openapi.py
+++ b/scripts/generate_openapi.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Génère la spécification OpenAPI depuis l'application FastAPI (issue #209).
diff --git a/scripts/gui_inventory.py b/scripts/gui_inventory.py
index 9b0fcd9c..8f544167 100644
--- a/scripts/gui_inventory.py
+++ b/scripts/gui_inventory.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Inventaire mesure de ``src/netcross_gtk4/app.py`` (issue #285).
Classe chaque methode selon qu'elle nomme directement ``Gtk``/``Gio``/
diff --git a/scripts/i18n-update.sh b/scripts/i18n-update.sh
index 2dd0b4ee..61804a21 100755
--- a/scripts/i18n-update.sh
+++ b/scripts/i18n-update.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
# scripts/i18n-update.sh -- maintenance des catalogues gettext (issue #299).
#
# scripts/i18n-update.sh xgettext -> lang/messages.pot,
diff --git a/scripts/i18n_report.py b/scripts/i18n_report.py
index 0aa2da4d..9b4babaf 100644
--- a/scripts/i18n_report.py
+++ b/scripts/i18n_report.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""scripts/i18n_report.py -- etat des traductions (issue #299).
Lit lang/LINGUAS, lang/messages.pot et lang/*.po sans dependance (ni gettext
diff --git a/scripts/import_lua_dissectors.py b/scripts/import_lua_dissectors.py
index 1ca29ebc..bcbc2472 100644
--- a/scripts/import_lua_dissectors.py
+++ b/scripts/import_lua_dissectors.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Normalise le recensement des dissecteurs Lua (dépôt Mathilde-Team/wireshark-lua,
CSV joint à l'issue #559) en ``data/lua_dissectors.csv`` (issue #917).
diff --git a/scripts/import_nvd.py b/scripts/import_nvd.py
index 2fff47a5..121a3870 100644
--- a/scripts/import_nvd.py
+++ b/scripts/import_nvd.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
scripts/import_nvd.py -- import (periodique) du flux NVD dans la base
CVE locale SQLite (netcross_core.security.cve_db), issue #138 (CVE-4).
diff --git a/scripts/instrument_loguru.py b/scripts/instrument_loguru.py
index e145ae77..fb1c7dee 100644
--- a/scripts/instrument_loguru.py
+++ b/scripts/instrument_loguru.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Instrumentation Loguru assistée (issue #441).
Ajoute, dans les fonctions non triviales qui n'ont encore aucun appel
diff --git a/scripts/instrument_sorties.py b/scripts/instrument_sorties.py
index c63b7900..4c2efdd5 100644
--- a/scripts/instrument_sorties.py
+++ b/scripts/instrument_sorties.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Instrumentation « un logger.debug() à chaque sortie » (issues de suite #441).
Pour chaque fonction d'un module, ajoute un ``logger.debug(...)`` juste
diff --git a/scripts/pcap_reels.py b/scripts/pcap_reels.py
index 71049370..2a1c9b0c 100644
--- a/scripts/pcap_reels.py
+++ b/scripts/pcap_reels.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests réels : analyse de la banque de pcap de la VM runner (issue #1008).
La banque (``/app/pcaps`` sur la VM ``ubuntu`` du runner ``docker``) contient
diff --git a/scripts/pr_coverage_comment.py b/scripts/pr_coverage_comment.py
index dba89caf..5ca8d8c5 100644
--- a/scripts/pr_coverage_comment.py
+++ b/scripts/pr_coverage_comment.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""pr_coverage_comment.py -- publie le commentaire de couverture d'une PR.
Suite de l'issue #224 (suivi de couverture en CI) : le workflow
diff --git a/scripts/smoke-test-packages.sh b/scripts/smoke-test-packages.sh
index acd65d54..bffb6375 100755
--- a/scripts/smoke-test-packages.sh
+++ b/scripts/smoke-test-packages.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
# scripts/smoke-test-packages.sh -- test de fumee des paquets installes (issue #342).
#
# La casse du .deb (#336 : sous-paquets et pcap_parser non installes) est
diff --git a/src/cross_capture_analyzer_cli.py b/src/cross_capture_analyzer_cli.py
index be8341cb..b8653cf6 100644
--- a/src/cross_capture_analyzer_cli.py
+++ b/src/cross_capture_analyzer_cli.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
cross_capture_analyzer_cli.py -- interface en ligne de commande pour
netcross_core. Le moteur d'analyse lui-meme (parsing, correlation,
@@ -184,6 +185,7 @@
)
from netcross_report.comm_map import build_comm_map, write_comm_map
from netcross_report.security_report import build_security_report, print_security_report
+from netcross_report.zeek_export import ZEEK_FORMATS, build_conn_records, write_zeek_conn
from pcap_parser.capture import split_by_interface
from pcap_parser.ek_source import TsharkError, TsharkNotFoundError
from pcap_parser.remote import CaptureSourceError, parse_source, split_live_target
@@ -1988,6 +1990,20 @@ def main():
metavar="FICHIER",
help="Fichier de sortie de --siem-export.",
)
+ ap.add_argument(
+ "--zeek-conn",
+ metavar="FICHIER",
+ help="Ecrit les journaux de flux au format Zeek conn.log (issue #1115) : une ligne par connexion "
+ "et par point, colonnes Zeek standard puis colonnes netcross_* (segment, latence et pertes par "
+ "segment avec --order). Respecte --redact. Voir docs/zeek-export.md.",
+ )
+ ap.add_argument(
+ "--zeek-format",
+ choices=ZEEK_FORMATS,
+ default="tsv",
+ help="Format de --zeek-conn : `tsv` (defaut, en-tetes #fields/#types, lisible par zeek-cut) ou "
+ "`json` (un objet par ligne, comme LogAscii::use_json).",
+ )
plug = ap.add_argument_group(
"plugins (issue #284)",
"Detecteurs et sorties tierces. Chargement EXPLICITE : un plugin installe n'est execute que "
@@ -2663,6 +2679,7 @@ def main():
("--tshark-stats", args.tshark_stats),
("--forensic-search", args.forensic_search),
("--detail-csv", args.detail_csv),
+ ("--zeek-conn", args.zeek_conn),
("--history-db", args.history_db),
("--client-group", args.client_group),
("--redact", args.redact),
@@ -2706,6 +2723,7 @@ def main():
("--tshark-stats", args.tshark_stats),
("--forensic-search", args.forensic_search),
("--detail-csv", args.detail_csv),
+ ("--zeek-conn", args.zeek_conn),
("--history-db", args.history_db),
("--client-group", args.client_group),
("--redact", args.redact),
@@ -2814,6 +2832,7 @@ def main():
("--tshark-stats", args.tshark_stats),
("--forensic-search", args.forensic_search),
("--detail-csv", args.detail_csv),
+ ("--zeek-conn", args.zeek_conn),
("--history-db", args.history_db),
("--client-group", args.client_group),
("--redact", args.redact),
@@ -3412,6 +3431,12 @@ def main():
if args.detail_csv:
write_detail_csv(args.detail_csv, flows, r.points, names=names)
print(f"\nDetail par flux ecrit dans {args.detail_csv}")
+ if args.zeek_conn:
+ # Paquets DEJA pseudonymises si --redact (redact_packets plus haut) :
+ # adresses et uid du conn.log n'exposent rien de reel.
+ zeek_records = build_conn_records(all_packets, r.points, points_order)
+ write_zeek_conn(zeek_records, args.zeek_conn, args.zeek_format)
+ print(f"\nJournal Zeek conn.log ({args.zeek_format}, {len(zeek_records)} ligne(s)) ecrit dans {args.zeek_conn}")
if args.dashboard:
import json as _json
diff --git a/src/cross_capture_batch_cli.py b/src/cross_capture_batch_cli.py
index cf93e433..ad9d8fbd 100644
--- a/src/cross_capture_batch_cli.py
+++ b/src/cross_capture_batch_cli.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Mode batch (issue #277) : expertise de toutes les captures d'un dossier,
et analyse croisee automatique des captures qui semblent etre plusieurs
diff --git a/src/cross_capture_diff_cli.py b/src/cross_capture_diff_cli.py
index 33d5f795..ac9b6001 100755
--- a/src/cross_capture_diff_cli.py
+++ b/src/cross_capture_diff_cli.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
cross_capture_diff_cli.py -- compare deux jeux de captures (avant/apres
un correctif, site A / site B...) et remonte les regressions et
diff --git a/src/cross_history_cli.py b/src/cross_history_cli.py
index 3981956e..b8f34aab 100755
--- a/src/cross_history_cli.py
+++ b/src/cross_history_cli.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
cross_history_cli.py -- interroge une base d'historique SQLite deja
alimentee par cross_capture_analyzer_cli.py/cross_capture_diff_cli.py
diff --git a/src/netcross_ai/__init__.py b/src/netcross_ai/__init__.py
index 78f8d37e..ec446fcd 100644
--- a/src/netcross_ai/__init__.py
+++ b/src/netcross_ai/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_ai -- module IA/ML **optionnel et local** (issue #146, FLOW-5).
diff --git a/src/netcross_ai/anomaly.py b/src/netcross_ai/anomaly.py
index 387ec233..e95fcf57 100644
--- a/src/netcross_ai/anomaly.py
+++ b/src/netcross_ai/anomaly.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Detection d'anomalies de flux par rapport a une baseline (Isolation Forest).
La baseline est un fichier JSON de **caracteristiques** (jamais un modele
diff --git a/src/netcross_ai/features.py b/src/netcross_ai/features.py
index c2ee9423..07306841 100644
--- a/src/netcross_ai/features.py
+++ b/src/netcross_ai/features.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Vecteur de caracteristiques d'un flux, calcule a partir des statistiques
FLOW-4 (``Report.flow_anomalies`` / ``security.flow_stats``) : taille,
SPLT, entropie, ratio montant/descendant, regularite temporelle.
diff --git a/src/netcross_ai/flow_classifier.py b/src/netcross_ai/flow_classifier.py
index c41a631e..b93d1dfa 100644
--- a/src/netcross_ai/flow_classifier.py
+++ b/src/netcross_ai/flow_classifier.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Classification de flux avec score de confiance (foret aleatoire).
Jeu d'entrainement : JSON ``netcross.ai.training/1`` -- une liste
diff --git a/src/netcross_ai/model_pack.py b/src/netcross_ai/model_pack.py
index c1273190..67b5246b 100644
--- a/src/netcross_ai/model_pack.py
+++ b/src/netcross_ai/model_pack.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Paquets de modeles partageables (issue #271).
Un **paquet de modele** est une archive ZIP autoportante qui transporte des
diff --git a/src/netcross_ai/optional.py b/src/netcross_ai/optional.py
index 99b11715..3bc44aba 100644
--- a/src/netcross_ai/optional.py
+++ b/src/netcross_ai/optional.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Detection de disponibilite des dependances ML et repli gracieux."""
from __future__ import annotations
diff --git a/src/netcross_ai/outbox.py b/src/netcross_ai/outbox.py
index dd145f0b..93f43eea 100644
--- a/src/netcross_ai/outbox.py
+++ b/src/netcross_ai/outbox.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Boite d'envoi hors connexion des paquets de modeles (issue #271).
Les remontees vers le depot peuvent devoir attendre une connexion : un
diff --git a/src/netcross_ai/pipeline.py b/src/netcross_ai/pipeline.py
index 9cb35761..1cc9523e 100644
--- a/src/netcross_ai/pipeline.py
+++ b/src/netcross_ai/pipeline.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Orchestration des trois usages pour la CLI (``--ai-*``) et mise en forme."""
from __future__ import annotations
diff --git a/src/netcross_ai/report_writer.py b/src/netcross_ai/report_writer.py
index 2b92e302..5597c546 100644
--- a/src/netcross_ai/report_writer.py
+++ b/src/netcross_ai/report_writer.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Redaction du resume executif en francais, des correlations et des
recommandations a partir d'un ``Report``.
diff --git a/src/netcross_ai_models_cli.py b/src/netcross_ai_models_cli.py
index 0d3ee3c9..f877bd6c 100644
--- a/src/netcross_ai_models_cli.py
+++ b/src/netcross_ai_models_cli.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_ai_models_cli -- paquets de modeles IA partageables et boite
d'envoi hors connexion (issue #271).
diff --git a/src/netcross_annotations_cli.py b/src/netcross_annotations_cli.py
index f4597b4a..b510366e 100644
--- a/src/netcross_annotations_cli.py
+++ b/src/netcross_annotations_cli.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross annotations -- etiquettes et signets sur des trames, en CLI
(issue #910).
diff --git a/src/netcross_api/__init__.py b/src/netcross_api/__init__.py
index f0270c00..2096ea87 100644
--- a/src/netcross_api/__init__.py
+++ b/src/netcross_api/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_api -- service REST FastAPI pour exposer les analyses Netcross
(issue #209).
diff --git a/src/netcross_api/annotations_routes.py b/src/netcross_api/annotations_routes.py
index e24e878e..0d2feebb 100644
--- a/src/netcross_api/annotations_routes.py
+++ b/src/netcross_api/annotations_routes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_api.annotations_routes -- annotations (etiquettes / signets sur
des trames) d'une analyse (issue #910), équivalent API du panneau
« Annotations / signets » de la GUI et de ``netcross annotations``.
diff --git a/src/netcross_api/app.py b/src/netcross_api/app.py
index 81d88521..4c952c46 100644
--- a/src/netcross_api/app.py
+++ b/src/netcross_api/app.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_api.app -- application FastAPI pour exposer les analyses Netcross
(issues #209, #354, #356).
diff --git a/src/netcross_api/batches.py b/src/netcross_api/batches.py
index 2436ae86..c52e7ea1 100644
--- a/src/netcross_api/batches.py
+++ b/src/netcross_api/batches.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_api.batches -- lots de captures de l'API (issue #872).
diff --git a/src/netcross_api/bpf_routes.py b/src/netcross_api/bpf_routes.py
index caf9d0f5..eb06753f 100644
--- a/src/netcross_api/bpf_routes.py
+++ b/src/netcross_api/bpf_routes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_api.bpf_routes -- bibliothèque de filtres BPF enregistrés
(issue #906), équivalent API de ``--bpf-library NOM`` et des boutons
« Filtres… » / « Enregistrer » de la GUI.
diff --git a/src/netcross_api/history_routes.py b/src/netcross_api/history_routes.py
index 38c52844..09f29000 100644
--- a/src/netcross_api/history_routes.py
+++ b/src/netcross_api/history_routes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_api.history_routes -- historique SQLite des runs (issue #874).
Équivalent de ``--history-db`` / ``netcross-history`` : la base est fixée
diff --git a/src/netcross_api/live_routes.py b/src/netcross_api/live_routes.py
index b1d0ecac..1a206093 100644
--- a/src/netcross_api/live_routes.py
+++ b/src/netcross_api/live_routes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_api.live_routes -- capture en direct sur des interfaces du
serveur, puis analyse (issue #902), équivalent API de ``--live`` et de la
case « Capture en direct » de la GUI.
diff --git a/src/netcross_api/lua_doc_routes.py b/src/netcross_api/lua_doc_routes.py
index 1a13c0b0..9494eba4 100644
--- a/src/netcross_api/lua_doc_routes.py
+++ b/src/netcross_api/lua_doc_routes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_api.lua_doc_routes -- documentation hors ligne de l'API Lua
Wireshark (issue #873), équivalent de ``netcross-lua-doc --json``.
diff --git a/src/netcross_api/models.py b/src/netcross_api/models.py
index 7ab700a9..ea4e3e0b 100644
--- a/src/netcross_api/models.py
+++ b/src/netcross_api/models.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_api.models -- modèles Pydantic pour les requêtes/réponses API
(issue #209).
diff --git a/src/netcross_api/store.py b/src/netcross_api/store.py
index 1ae5c035..c24a0b92 100644
--- a/src/netcross_api/store.py
+++ b/src/netcross_api/store.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_api.store -- analyses de l'API : statut, document JSON, persistance.
diff --git a/src/netcross_api/tools_routes.py b/src/netcross_api/tools_routes.py
index 262f4225..32c0d433 100644
--- a/src/netcross_api/tools_routes.py
+++ b/src/netcross_api/tools_routes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_api.tools_routes -- manipulation de captures (issues #868,
#869, #870, #886, #887), équivalents des modes utilitaires de la CLI :
diff --git a/src/netcross_core/__init__.py b/src/netcross_core/__init__.py
index 7f19e1ec..fb2dfe89 100644
--- a/src/netcross_core/__init__.py
+++ b/src/netcross_core/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core -- moteur d'analyse croisee de captures Wireshark
multi-points, sans dependance a une interface (CLI, GTK4, PDF...).
diff --git a/src/netcross_core/active/__init__.py b/src/netcross_core/active/__init__.py
index 4902db0f..a679f4ab 100644
--- a/src/netcross_core/active/__init__.py
+++ b/src/netcross_core/active/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.active -- confirmation active du diagnostic passif (chantier
#999, parent #993).
diff --git a/src/netcross_core/active/planner.py b/src/netcross_core/active/planner.py
index c7327291..815bcb54 100644
--- a/src/netcross_core/active/planner.py
+++ b/src/netcross_core/active/planner.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.active.planner -- planificateur « constat localise -> mesure
active proposee » (issue #1063, sous-issue 1/5 du chantier #999).
diff --git a/src/netcross_core/alarms.py b/src/netcross_core/alarms.py
index 20fe425b..8b3bbe8a 100644
--- a/src/netcross_core/alarms.py
+++ b/src/netcross_core/alarms.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.alarms -- alarmes et surveillance de seuils en analyse live
(§6.16, Session 11).
diff --git a/src/netcross_core/analysis.py b/src/netcross_core/analysis.py
index 191a95db..b4017dae 100644
--- a/src/netcross_core/analysis.py
+++ b/src/netcross_core/analysis.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.analysis -- coeur analytique : construit un Report a partir
des flux correles (pertes, latence, TTL/topologie, QoS, fragmentation,
diff --git a/src/netcross_core/annotations.py b/src/netcross_core/annotations.py
index b0f4d006..93d92f4b 100644
--- a/src/netcross_core/annotations.py
+++ b/src/netcross_core/annotations.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_core.annotations -- annotations (etiquettes / signets sur des
trames) partagees par la CLI et l'API (issue #910).
diff --git a/src/netcross_core/application/__init__.py b/src/netcross_core/application/__init__.py
index 3c661ab1..0eeb0cd2 100644
--- a/src/netcross_core/application/__init__.py
+++ b/src/netcross_core/application/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.application -- modele transactionnel applicatif (Job 23,
§6.9/§6.10).
diff --git a/src/netcross_core/application/banners.py b/src/netcross_core/application/banners.py
index b3ef935b..89242a0d 100644
--- a/src/netcross_core/application/banners.py
+++ b/src/netcross_core/application/banners.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.application.banners -- extraction passive des bannieres de
versions logicielles et construction de `Report.service_fingerprints`
diff --git a/src/netcross_core/application/classify.py b/src/netcross_core/application/classify.py
index 44e7470c..ef5aacad 100644
--- a/src/netcross_core/application/classify.py
+++ b/src/netcross_core/application/classify.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.application.classify -- classification automatique des
transactions applicatives (Job 23, §6.9).
diff --git a/src/netcross_core/application/dns.py b/src/netcross_core/application/dns.py
index e71252d1..24bcb7db 100644
--- a/src/netcross_core/application/dns.py
+++ b/src/netcross_core/application/dns.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.application.dns -- construction de transactions DNS a
partir des paquets (Job 23, §6.9).
diff --git a/src/netcross_core/application/http.py b/src/netcross_core/application/http.py
index d7bdaafd..4c84f81c 100644
--- a/src/netcross_core/application/http.py
+++ b/src/netcross_core/application/http.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.application.http -- construction de transactions HTTP a
partir des paquets (Job 23, §6.10).
diff --git a/src/netcross_core/application/models.py b/src/netcross_core/application/models.py
index 0edc0112..778689c9 100644
--- a/src/netcross_core/application/models.py
+++ b/src/netcross_core/application/models.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.application.models -- structures de donnees du modele
transactionnel applicatif (Job 23, §6.9/§6.10).
diff --git a/src/netcross_core/baseline_diff.py b/src/netcross_core/baseline_diff.py
index d7c440c0..9762a736 100644
--- a/src/netcross_core/baseline_diff.py
+++ b/src/netcross_core/baseline_diff.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.baseline_diff -- compare deux Report (avant/apres un
correctif, site A / site B, ou toute paire de scenarios comparables) et
diff --git a/src/netcross_core/baseline_profile.py b/src/netcross_core/baseline_profile.py
index 70a5104f..54f1dff9 100644
--- a/src/netcross_core/baseline_profile.py
+++ b/src/netcross_core/baseline_profile.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.baseline_profile -- profil de reference dynamique construit
a partir de l'historique SQLite (Job 12/issue #9, section 8.5 de
diff --git a/src/netcross_core/batch.py b/src/netcross_core/batch.py
index 35a12a72..e514ba66 100644
--- a/src/netcross_core/batch.py
+++ b/src/netcross_core/batch.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Mode batch : inventaire d'un dossier de captures et regroupement
automatique CONSERVATEUR des captures qui semblent etre plusieurs points
diff --git a/src/netcross_core/bpf_filters.py b/src/netcross_core/bpf_filters.py
index 60143181..c2fed964 100644
--- a/src/netcross_core/bpf_filters.py
+++ b/src/netcross_core/bpf_filters.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.bpf_filters -- catalogue de filtres BPF predefinis et filtres
sauvegardes par l'utilisateur (Job 47 / issue #167).
diff --git a/src/netcross_core/capture_tools.py b/src/netcross_core/capture_tools.py
index e6f7f4eb..faee21b8 100644
--- a/src/netcross_core/capture_tools.py
+++ b/src/netcross_core/capture_tools.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_core.capture_tools -- manipulation de fichiers de capture
partagee par la CLI, la GUI et l'API (issues #868, #869, #870, #886, #887).
diff --git a/src/netcross_core/causality.py b/src/netcross_core/causality.py
index 011e45e8..6073aa79 100644
--- a/src/netcross_core/causality.py
+++ b/src/netcross_core/causality.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.causality -- moteur de correlation causale (Session 3 de la
section 13.3 de FEATURES.md, Job 4/issue #4).
diff --git a/src/netcross_core/client_diff.py b/src/netcross_core/client_diff.py
index dbc3e5f7..10c48cd4 100644
--- a/src/netcross_core/client_diff.py
+++ b/src/netcross_core/client_diff.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.client_diff -- comparaison "client vs client" : meme
capture, memes points, seule la source (l'IP du poste) change. Troisieme
diff --git a/src/netcross_core/clock_sync.py b/src/netcross_core/clock_sync.py
index afc628f1..9bd7e305 100644
--- a/src/netcross_core/clock_sync.py
+++ b/src/netcross_core/clock_sync.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.clock_sync -- estimation robuste du decalage et de la derive
d'horloge entre deux points de capture (issue #996).
diff --git a/src/netcross_core/compliance.py b/src/netcross_core/compliance.py
index 2767945d..3240dcfc 100644
--- a/src/netcross_core/compliance.py
+++ b/src/netcross_core/compliance.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.compliance -- evaluateur de conformite, huitieme et
neuvieme objets de contrat de la Session 0 (FEATURES.md section 13.3) :
diff --git a/src/netcross_core/config.py b/src/netcross_core/config.py
index f0d336f7..a6302615 100644
--- a/src/netcross_core/config.py
+++ b/src/netcross_core/config.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.config -- chargement de configuration depuis .netcross.toml
(issue #170).
diff --git a/src/netcross_core/content.py b/src/netcross_core/content.py
index 722ae6e9..eb1cc54e 100644
--- a/src/netcross_core/content.py
+++ b/src/netcross_core/content.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Extraction des objets applicatifs HTTP/1.x sans conservation du corps.
Le module travaille uniquement sur les metadonnees deja extraites par tshark.
diff --git a/src/netcross_core/correlate.py b/src/netcross_core/correlate.py
index 43d211aa..ea41337f 100644
--- a/src/netcross_core/correlate.py
+++ b/src/netcross_core/correlate.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.correlate -- correlation des paquets entre points de
capture (par 5-tuple strict ou par hash de payload en mode NAT-tolerant)
diff --git a/src/netcross_core/dashboard.py b/src/netcross_core/dashboard.py
index e79a2432..d8b804a6 100644
--- a/src/netcross_core/dashboard.py
+++ b/src/netcross_core/dashboard.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.dashboard -- contexte d'analyse partage pour le
dashboard analytique interactif (issue #18, section 6.17).
diff --git a/src/netcross_core/detector_inventory.py b/src/netcross_core/detector_inventory.py
index 67de95b8..5340f8ba 100644
--- a/src/netcross_core/detector_inventory.py
+++ b/src/netcross_core/detector_inventory.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Inventaire des détecteurs et de leur besoin de vue globale (issue #1020, chantier #995).
Avant de passer le pipeline en flux (#995 : fenêtre glissante #1022, état
diff --git a/src/netcross_core/discovery/__init__.py b/src/netcross_core/discovery/__init__.py
index 3208d5bf..fa030183 100644
--- a/src/netcross_core/discovery/__init__.py
+++ b/src/netcross_core/discovery/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.discovery -- decouverte et cartographie passive des actifs
reseau (SCENARIO-5, issue #151, parent #141).
diff --git a/src/netcross_core/discovery/assets.py b/src/netcross_core/discovery/assets.py
index 7462b38b..7fd686be 100644
--- a/src/netcross_core/discovery/assets.py
+++ b/src/netcross_core/discovery/assets.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.discovery.assets -- inventaire passif des actifs reseau
(SCENARIO-5, issue #151, parent #141).
diff --git a/src/netcross_core/discovery/os_detect.py b/src/netcross_core/discovery/os_detect.py
index 752b62af..a02577fa 100644
--- a/src/netcross_core/discovery/os_detect.py
+++ b/src/netcross_core/discovery/os_detect.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.discovery.os_detect -- identification passive de systeme
d'exploitation par TTL et options TCP (empreinte type p0f), SCENARIO-5
diff --git a/src/netcross_core/expert_model.py b/src/netcross_core/expert_model.py
index 4076c701..51870e48 100644
--- a/src/netcross_core/expert_model.py
+++ b/src/netcross_core/expert_model.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.expert_model -- objets de contrat partages entre
netcross_core et netcross_report ("Session 0" de FEATURES.md section 13.3 :
diff --git a/src/netcross_core/expert_rules.py b/src/netcross_core/expert_rules.py
index 8868af46..54467b98 100644
--- a/src/netcross_core/expert_rules.py
+++ b/src/netcross_core/expert_rules.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.expert_rules -- bibliotheque de regles d'expertise reseau
DECLARATIVE (FEATURES.md section 6.2), dernier chantier de la Session 2
diff --git a/src/netcross_core/exploit_signatures.py b/src/netcross_core/exploit_signatures.py
index 3c997107..fe37c14f 100644
--- a/src/netcross_core/exploit_signatures.py
+++ b/src/netcross_core/exploit_signatures.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.exploit_signatures -- detection PASSIVE de signatures
d'exploits CVE connus (Log4Shell, Shellshock, Heartbleed, EternalBlue,
diff --git a/src/netcross_core/extract/__init__.py b/src/netcross_core/extract/__init__.py
index 60b5a933..15dad9a1 100644
--- a/src/netcross_core/extract/__init__.py
+++ b/src/netcross_core/extract/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.extract -- extraction et reconstruction de fichiers (issue #150).
"""
diff --git a/src/netcross_core/extract/carver.py b/src/netcross_core/extract/carver.py
index f7064ce6..d7871cae 100644
--- a/src/netcross_core/extract/carver.py
+++ b/src/netcross_core/extract/carver.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.extract.carver -- issue #150 (SCENARIO-4, parent #141) :
extraction et reconstruction de fichiers depuis les traces réseau.
diff --git a/src/netcross_core/extract/contents.py b/src/netcross_core/extract/contents.py
index 70c7a784..a8ee3fea 100644
--- a/src/netcross_core/extract/contents.py
+++ b/src/netcross_core/extract/contents.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.extract.contents -- issue #278 : extraction des contenus
(audio, video, documents) a titre d'analyse qualitative, avec rappel de
diff --git a/src/netcross_core/extract/media.py b/src/netcross_core/extract/media.py
index ec7a1754..8b06367d 100644
--- a/src/netcross_core/extract/media.py
+++ b/src/netcross_core/extract/media.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.extract.media -- issue #278 : flux RTP audio/video.
diff --git a/src/netcross_core/fingerprint/__init__.py b/src/netcross_core/fingerprint/__init__.py
index d72e9c1a..9f80d006 100644
--- a/src/netcross_core/fingerprint/__init__.py
+++ b/src/netcross_core/fingerprint/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.fingerprint -- empreintes JA4 (TLS) et HASSH (SSH), issue
#143 (FLOW-2, parent #141).
diff --git a/src/netcross_core/fingerprint/known.py b/src/netcross_core/fingerprint/known.py
index c510e8d4..72b83fce 100644
--- a/src/netcross_core/fingerprint/known.py
+++ b/src/netcross_core/fingerprint/known.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.fingerprint.known -- base de correspondances empreinte ->
nom d'outil (issue #143, critere d'acceptation "base de fingerprints
diff --git a/src/netcross_core/fingerprint/report.py b/src/netcross_core/fingerprint/report.py
index 40682dbc..51948995 100644
--- a/src/netcross_core/fingerprint/report.py
+++ b/src/netcross_core/fingerprint/report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.fingerprint.report -- consolidation des empreintes JA4/
HASSH vues par paquet en entrees pretes pour `Report.service_fingerprints`
diff --git a/src/netcross_core/fingerprint/ssh_hassh.py b/src/netcross_core/fingerprint/ssh_hassh.py
index ecca11d3..83a07887 100644
--- a/src/netcross_core/fingerprint/ssh_hassh.py
+++ b/src/netcross_core/fingerprint/ssh_hassh.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.fingerprint.ssh_hassh -- empreinte HASSH d'une negociation
SSH (issue #143, FLOW-2).
diff --git a/src/netcross_core/fingerprint/tls_ja4.py b/src/netcross_core/fingerprint/tls_ja4.py
index 7a6ba37e..795010f1 100644
--- a/src/netcross_core/fingerprint/tls_ja4.py
+++ b/src/netcross_core/fingerprint/tls_ja4.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.fingerprint.tls_ja4 -- empreinte JA4 d'un ClientHello TLS
(issue #143, FLOW-2).
diff --git a/src/netcross_core/flow_timeline.py b/src/netcross_core/flow_timeline.py
index 2d4721e3..3665987c 100644
--- a/src/netcross_core/flow_timeline.py
+++ b/src/netcross_core/flow_timeline.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
r"""
netcross_core.flow_timeline -- vue temporelle detaillee d'un flux
(Job 13/issue #10, section 6.4 de FEATURES.md).
diff --git a/src/netcross_core/flow_view.py b/src/netcross_core/flow_view.py
index c2c276e5..690b37cf 100644
--- a/src/netcross_core/flow_view.py
+++ b/src/netcross_core/flow_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.flow_view -- vue enrichie d'un flux (FlowView), sixieme
objet de contrat de la Session 0 (Job 9/issue #6, section 6.4 et 6.14 de
diff --git a/src/netcross_core/forensic.py b/src/netcross_core/forensic.py
index 5379080c..a0b52f7f 100644
--- a/src/netcross_core/forensic.py
+++ b/src/netcross_core/forensic.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.forensic -- index de correlation bidirectionnel evenement ↔
flow ↔ paquet (Job 8/issue #5, §6.3 et §6.14 de FEATURES.md).
diff --git a/src/netcross_core/forensic_search.py b/src/netcross_core/forensic_search.py
index b2130f21..1f17f156 100644
--- a/src/netcross_core/forensic_search.py
+++ b/src/netcross_core/forensic_search.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.forensic_search -- moteur de recherche analytique post-capture
transversal (Job 17 / issue #16, section 6.13 de FEATURES.md).
diff --git a/src/netcross_core/i18n.py b/src/netcross_core/i18n.py
index 256208ba..174235db 100644
--- a/src/netcross_core/i18n.py
+++ b/src/netcross_core/i18n.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_core.i18n -- internationalisation par GNU gettext (issue #299).
Les chaines destinees a l'utilisateur sont ecrites en francais (langue
diff --git a/src/netcross_core/link_speed.py b/src/netcross_core/link_speed.py
index ff282372..5f0d0cb4 100644
--- a/src/netcross_core/link_speed.py
+++ b/src/netcross_core/link_speed.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Vitesse de lien et resolution d'horodatage par point (issue #1132).
Premiere brique du chantier microrafales (#1005) : pour chaque point de
diff --git a/src/netcross_core/live_diff.py b/src/netcross_core/live_diff.py
index b493373a..0ecef90c 100644
--- a/src/netcross_core/live_diff.py
+++ b/src/netcross_core/live_diff.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Capture en continu + diff en direct (Job 33, issue #33).
Le plus gros chantier des pistes d'origine : capture continue avec diff
diff --git a/src/netcross_core/live_report.py b/src/netcross_core/live_report.py
index 87f0d0f5..821a0e1a 100644
--- a/src/netcross_core/live_report.py
+++ b/src/netcross_core/live_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.live_report -- issue #274 : export / rapport temps reel du
mode ``--live``.
diff --git a/src/netcross_core/logging_config.py b/src/netcross_core/logging_config.py
index 39e2a0be..52e96dde 100644
--- a/src/netcross_core/logging_config.py
+++ b/src/netcross_core/logging_config.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.logging_config -- configuration centrale du logging (issue #245).
diff --git a/src/netcross_core/lua_dissectors.py b/src/netcross_core/lua_dissectors.py
index 3abd055f..cf90e2a6 100644
--- a/src/netcross_core/lua_dissectors.py
+++ b/src/netcross_core/lua_dissectors.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.lua_dissectors -- catalogue des dissecteurs Wireshark écrits en
Lua, dans la banque Lua (issue #917).
diff --git a/src/netcross_core/lua_doc.py b/src/netcross_core/lua_doc.py
index c68f5ded..9c85b190 100644
--- a/src/netcross_core/lua_doc.py
+++ b/src/netcross_core/lua_doc.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.lua_doc -- banque SQLite locale de l'API Lua Wireshark
(issue #387, rattachee a #331).
diff --git a/src/netcross_core/models.py b/src/netcross_core/models.py
index 936cb959..aef18151 100644
--- a/src/netcross_core/models.py
+++ b/src/netcross_core/models.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.models -- structures de donnees partagees : un paquet
normalise (Pkt) et le resultat d'analyse consolide (Report).
diff --git a/src/netcross_core/naming.py b/src/netcross_core/naming.py
index daab4fd1..42239ee2 100644
--- a/src/netcross_core/naming.py
+++ b/src/netcross_core/naming.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.naming -- table locale de correspondance adresse/MAC -> nom
logique, type, contexte (Job 18 / issue #16-bis, section 6.15 de FEATURES.md).
diff --git a/src/netcross_core/netflow/__init__.py b/src/netcross_core/netflow/__init__.py
index 7594fcb1..70659cc7 100644
--- a/src/netcross_core/netflow/__init__.py
+++ b/src/netcross_core/netflow/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.netflow -- ingestion NetFlow/sFlow comme source de
donnees alternative aux captures pcap (Job 32, issue #32).
diff --git a/src/netcross_core/netflow/adapter.py b/src/netcross_core/netflow/adapter.py
index 51c990d6..530ec14e 100644
--- a/src/netcross_core/netflow/adapter.py
+++ b/src/netcross_core/netflow/adapter.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.netflow.adapter -- conversion FlowRecord -> Pkt.
diff --git a/src/netcross_core/netflow/models.py b/src/netcross_core/netflow/models.py
index 47b19d3a..5f1fb770 100644
--- a/src/netcross_core/netflow/models.py
+++ b/src/netcross_core/netflow/models.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.netflow.models -- structure de donnees partagee pour un
flux agrege NetFlow/sFlow (FlowRecord), distincte de Pkt.
diff --git a/src/netcross_core/netflow/netflow_v5.py b/src/netcross_core/netflow/netflow_v5.py
index 26ad8b73..6ef1d1ef 100644
--- a/src/netcross_core/netflow/netflow_v5.py
+++ b/src/netcross_core/netflow/netflow_v5.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.netflow.netflow_v5 -- parseur NetFlow v5 (RFC 1568 /
format Cisco historique, le plus repandu et le plus simple des
diff --git a/src/netcross_core/netflow/summary.py b/src/netcross_core/netflow/summary.py
index c02561d2..4edf62f9 100644
--- a/src/netcross_core/netflow/summary.py
+++ b/src/netcross_core/netflow/summary.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Resume d'un export NetFlow (issue #362) : volumes, protocoles, principaux
emetteurs, conversations et ports de destination.
diff --git a/src/netcross_core/notify/__init__.py b/src/netcross_core/notify/__init__.py
index 55047727..f136dc9e 100644
--- a/src/netcross_core/notify/__init__.py
+++ b/src/netcross_core/notify/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.notify -- notifications sortantes sur seuil de gravite
(webhook, Slack, courriel), issue #280. Voir docs/notifications.md.
diff --git a/src/netcross_core/notify/dispatch.py b/src/netcross_core/notify/dispatch.py
index e40b6baf..e61c571d 100644
--- a/src/netcross_core/notify/dispatch.py
+++ b/src/netcross_core/notify/dispatch.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.notify.dispatch -- repartition, garde-fous et tracabilite
des notifications (issue #280).
diff --git a/src/netcross_core/notify/request.py b/src/netcross_core/notify/request.py
index c7c6349c..bb164d41 100644
--- a/src/netcross_core/notify/request.py
+++ b/src/netcross_core/notify/request.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_core.notify.request -- notifications d'une analyse terminee,
reglages et envoi partages par la GUI (issue #676) et l'API (issue #875).
diff --git a/src/netcross_core/notify/summary.py b/src/netcross_core/notify/summary.py
index e870aaad..4bf5544b 100644
--- a/src/netcross_core/notify/summary.py
+++ b/src/netcross_core/notify/summary.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.notify.summary -- resume d'analyse a notifier (issue #280).
diff --git a/src/netcross_core/notify/transports.py b/src/netcross_core/notify/transports.py
index 0c1f4da8..532b3e3e 100644
--- a/src/netcross_core/notify/transports.py
+++ b/src/netcross_core/notify/transports.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.notify.transports -- canaux de notification (issue #280).
diff --git a/src/netcross_core/packet_limits.py b/src/netcross_core/packet_limits.py
index a3a9582a..fb9bf905 100644
--- a/src/netcross_core/packet_limits.py
+++ b/src/netcross_core/packet_limits.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_core.packet_limits -- ``--max-packets`` et ``--sample`` (issue
#283), partages par la CLI et la GUI (issue #672).
diff --git a/src/netcross_core/parsing.py b/src/netcross_core/parsing.py
index 37a78820..e09a1611 100644
--- a/src/netcross_core/parsing.py
+++ b/src/netcross_core/parsing.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.parsing -- adaptateur entre pcap_parser (decodage via
tshark -T ek) et le modele Pkt de netcross_core.
diff --git a/src/netcross_core/plugins/__init__.py b/src/netcross_core/plugins/__init__.py
index e876c7e0..0a164415 100644
--- a/src/netcross_core/plugins/__init__.py
+++ b/src/netcross_core/plugins/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.plugins -- detecteurs et sorties tierces (issue #284).
Voir docs/plugins.md : contrat, schema des constats, limites de securite.
diff --git a/src/netcross_core/plugins/api.py b/src/netcross_core/plugins/api.py
index 97ad844a..819a3c45 100644
--- a/src/netcross_core/plugins/api.py
+++ b/src/netcross_core/plugins/api.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.plugins.api -- contrat des plugins (issue #284).
diff --git a/src/netcross_core/plugins/loader.py b/src/netcross_core/plugins/loader.py
index 1c6a1867..ab4f21ec 100644
--- a/src/netcross_core/plugins/loader.py
+++ b/src/netcross_core/plugins/loader.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.plugins.loader -- decouverte et chargement EXPLICITE des
plugins (issue #284).
diff --git a/src/netcross_core/plugins/runner.py b/src/netcross_core/plugins/runner.py
index f494c7c9..ab539b04 100644
--- a/src/netcross_core/plugins/runner.py
+++ b/src/netcross_core/plugins/runner.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.plugins.runner -- execution isolee des plugins (issue #284).
diff --git a/src/netcross_core/profiling.py b/src/netcross_core/profiling.py
index e4b7f368..96973b3c 100644
--- a/src/netcross_core/profiling.py
+++ b/src/netcross_core/profiling.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Mesure par étape du pipeline d'analyse (issue #1016, banc #994).
Chronomètre « au tour » : :meth:`MesuresPipeline.etape` clôt l'étape en
diff --git a/src/netcross_core/pseudonyms.py b/src/netcross_core/pseudonyms.py
index da10b7e6..77ce60e6 100644
--- a/src/netcross_core/pseudonyms.py
+++ b/src/netcross_core/pseudonyms.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Module commun de pseudonymisation : adresses et noms (issue #1151).
Factorise la mecanique de pseudonymisation jusque-la propre a
diff --git a/src/netcross_core/quic_diagnostics.py b/src/netcross_core/quic_diagnostics.py
index c01b229a..7399b842 100644
--- a/src/netcross_core/quic_diagnostics.py
+++ b/src/netcross_core/quic_diagnostics.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.quic_diagnostics -- extraction du SNI des paquets QUIC
Initial v1 et v2 (RFC 9000/9001/9369), pour voir le trafic HTTP/3 moderne (Chrome, Teams,
diff --git a/src/netcross_core/redact.py b/src/netcross_core/redact.py
index 8b335d56..92efd0ac 100644
--- a/src/netcross_core/redact.py
+++ b/src/netcross_core/redact.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.redact -- anonymisation des adresses (IP/MAC) d'une liste
de paquets deja chargee, en vue d'un partage externe (ticket support
diff --git a/src/netcross_core/report_text.py b/src/netcross_core/report_text.py
index 2accc8ca..7f3222d7 100644
--- a/src/netcross_core/report_text.py
+++ b/src/netcross_core/report_text.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.report_text -- mise en forme du Report en sortie texte
console et en CSV de detail. Le rendu PDF (a venir) consommera le meme
diff --git a/src/netcross_core/security/__init__.py b/src/netcross_core/security/__init__.py
index 7aa14f88..c757122f 100644
--- a/src/netcross_core/security/__init__.py
+++ b/src/netcross_core/security/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security -- detection passive de vulnerabilites (CVE) sur
traces reseau (issue #133, sous-tache CVE-4 / issue #138).
diff --git a/src/netcross_core/security/address_scope.py b/src/netcross_core/security/address_scope.py
index 1f7ac959..db41b880 100644
--- a/src/netcross_core/security/address_scope.py
+++ b/src/netcross_core/security/address_scope.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Portee d'une adresse (interne / externe) pour les detecteurs de securite.
Issue #365 : les plages de documentation TEST-NET (RFC 5737) --
diff --git a/src/netcross_core/security/beaconing.py b/src/netcross_core/security/beaconing.py
index a3e4424c..12742b9e 100644
--- a/src/netcross_core/security/beaconing.py
+++ b/src/netcross_core/security/beaconing.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.beaconing -- issue #147 (SCENARIO-1, parent #141) :
detection de beaconing C2 (communications periodiques d'un hote interne
diff --git a/src/netcross_core/security/cpe_match.py b/src/netcross_core/security/cpe_match.py
index 24dab9f4..ea5bbcea 100644
--- a/src/netcross_core/security/cpe_match.py
+++ b/src/netcross_core/security/cpe_match.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.cpe_match -- conversion d'une banniere de service
("Apache/2.4.41") en identifiant CPE 2.3 et comparaison de versions avec
diff --git a/src/netcross_core/security/cve_db.py b/src/netcross_core/security/cve_db.py
index 4762967a..c79ea3f3 100644
--- a/src/netcross_core/security/cve_db.py
+++ b/src/netcross_core/security/cve_db.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.cve_db -- base SQLite locale des CVE, peuplee par
scripts/import_nvd.py depuis le flux NVD (voir ce script pour le format
diff --git a/src/netcross_core/security/cve_seed.py b/src/netcross_core/security/cve_seed.py
index 1b201291..e1ec7446 100644
--- a/src/netcross_core/security/cve_seed.py
+++ b/src/netcross_core/security/cve_seed.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Base CVE minimale embarquee (issue #353).
diff --git a/src/netcross_core/security/dga.py b/src/netcross_core/security/dga.py
index 9c995378..00eed3f2 100644
--- a/src/netcross_core/security/dga.py
+++ b/src/netcross_core/security/dga.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.dga -- issue #152 (SCENARIO-6, parent #141) :
detection de domaines generes algorithmiquement (DGA).
diff --git a/src/netcross_core/security/dns_tunnel.py b/src/netcross_core/security/dns_tunnel.py
index 4c2c2314..2b78f4a5 100644
--- a/src/netcross_core/security/dns_tunnel.py
+++ b/src/netcross_core/security/dns_tunnel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.dns_tunnel -- issue #144 (FLOW-3, parent #141) :
detection de tunneling DNS (exfiltration, C2, VPN over DNS).
diff --git a/src/netcross_core/security/exfiltration.py b/src/netcross_core/security/exfiltration.py
index 9b41a1c9..ab966594 100644
--- a/src/netcross_core/security/exfiltration.py
+++ b/src/netcross_core/security/exfiltration.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.exfiltration -- issue #148 (SCENARIO-2, parent #141) :
detection d'exfiltration de donnees (transferts sortants anormaux).
diff --git a/src/netcross_core/security/expert_correlation.py b/src/netcross_core/security/expert_correlation.py
index 6a211ae0..42bb982f 100644
--- a/src/netcross_core/security/expert_correlation.py
+++ b/src/netcross_core/security/expert_correlation.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.expert_correlation -- issue #137 (CVE-3) :
exploitation des alertes Expert Info de tshark pour DETECTER des
diff --git a/src/netcross_core/security/fast_flux.py b/src/netcross_core/security/fast_flux.py
index f3b9dd66..79be4da0 100644
--- a/src/netcross_core/security/fast_flux.py
+++ b/src/netcross_core/security/fast_flux.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.fast_flux -- issue #152 (SCENARIO-6, parent #141) :
detection d'infrastructures a flux rapide (fast flux) utilisees par les
diff --git a/src/netcross_core/security/findings.py b/src/netcross_core/security/findings.py
index 7d3d1c02..b412e422 100644
--- a/src/netcross_core/security/findings.py
+++ b/src/netcross_core/security/findings.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.findings -- alimentation de
`Report.service_fingerprints` et `Report.security_findings` a partir des
diff --git a/src/netcross_core/security/flow_stats.py b/src/netcross_core/security/flow_stats.py
index 26bf2c47..fd42e2f6 100644
--- a/src/netcross_core/security/flow_stats.py
+++ b/src/netcross_core/security/flow_stats.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.flow_stats -- issue #145 (FLOW-4, parent #141) :
analyse statistique des flux pour detecter les comportements anormaux.
diff --git a/src/netcross_core/security/lateral_movement.py b/src/netcross_core/security/lateral_movement.py
index f4a67577..a14c9ce1 100644
--- a/src/netcross_core/security/lateral_movement.py
+++ b/src/netcross_core/security/lateral_movement.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.lateral_movement -- issue #149 (SCENARIO-3, parent
#141) : detection de mouvements latéraux internes (scans réseau,
diff --git a/src/netcross_core/security/protocol_mismatch.py b/src/netcross_core/security/protocol_mismatch.py
index 0a8183fe..89910d09 100644
--- a/src/netcross_core/security/protocol_mismatch.py
+++ b/src/netcross_core/security/protocol_mismatch.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.protocol_mismatch -- issue #142 (FLOW-1, parent
#141) : detection des flux cachés où un protocole utilise un port non
diff --git a/src/netcross_core/security/tls_audit.py b/src/netcross_core/security/tls_audit.py
index 972e1ef7..526ba5f5 100644
--- a/src/netcross_core/security/tls_audit.py
+++ b/src/netcross_core/security/tls_audit.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.tls_audit -- issue #153 (SCENARIO-7, parent #141) :
audit des certificats TLS presentes par les serveurs (expires, auto-signes,
diff --git a/src/netcross_core/stats.py b/src/netcross_core/stats.py
index 8900791d..8e636330 100644
--- a/src/netcross_core/stats.py
+++ b/src/netcross_core/stats.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Exploration statistique interactive (Job 27 / issue #22, section 6.8).
Couche generique d'exploration statistique sur les donnees deja calculees
diff --git a/src/netcross_core/support/__init__.py b/src/netcross_core/support/__init__.py
index 00dad476..28b3413e 100644
--- a/src/netcross_core/support/__init__.py
+++ b/src/netcross_core/support/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.support -- remontee de tickets anonymisee (issue #269).
diff --git a/src/netcross_core/support/scrubber.py b/src/netcross_core/support/scrubber.py
index 2cf72efa..cfe30bd7 100644
--- a/src/netcross_core/support/scrubber.py
+++ b/src/netcross_core/support/scrubber.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.support.scrubber -- anonymisation de TEXTE LIBRE (issue #269).
diff --git a/src/netcross_core/support/ticket.py b/src/netcross_core/support/ticket.py
index 8f7794d7..373995d9 100644
--- a/src/netcross_core/support/ticket.py
+++ b/src/netcross_core/support/ticket.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.support.ticket -- remontee de tickets anonymisee (issue #269).
diff --git a/src/netcross_core/testing/__init__.py b/src/netcross_core/testing/__init__.py
index 08af63b6..5194d882 100644
--- a/src/netcross_core/testing/__init__.py
+++ b/src/netcross_core/testing/__init__.py
@@ -1 +1,2 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Outils de test réutilisables (jeux synthétiques du banc #994)."""
diff --git a/src/netcross_core/testing/synth.py b/src/netcross_core/testing/synth.py
index 114f8e73..27713316 100644
--- a/src/netcross_core/testing/synth.py
+++ b/src/netcross_core/testing/synth.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Jeux synthétiques multi-points déterministes (issue #1015, banc #994).
Produit, pour un chemin linéaire de N points de capture ``P1 → … → PN``,
diff --git a/src/netcross_core/tls_diagnostics.py b/src/netcross_core/tls_diagnostics.py
index 93b82b53..9d3d7216 100644
--- a/src/netcross_core/tls_diagnostics.py
+++ b/src/netcross_core/tls_diagnostics.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tls_diagnostics -- extrait l'etat des handshakes TLS
(ClientHello/ServerHello/Alert/donnees applicatives) a chaque point de
diff --git a/src/netcross_core/tls_keylog.py b/src/netcross_core/tls_keylog.py
index 25a17934..f8e32056 100644
--- a/src/netcross_core/tls_keylog.py
+++ b/src/netcross_core/tls_keylog.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Fichiers de clés TLS (SSLKEYLOGFILE) par point de capture (issue #1040, chantier #997).
``--tls-keylog FICHIER`` vaut pour tous les points, ``--tls-keylog NOM=FICHIER``
diff --git a/src/netcross_core/tshark_stats/__init__.py b/src/netcross_core/tshark_stats/__init__.py
index 50385756..30128615 100644
--- a/src/netcross_core/tshark_stats/__init__.py
+++ b/src/netcross_core/tshark_stats/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats -- adaptateurs de statistiques ``tshark -z``
(Job 19 / issue #20, section 6.19 de features-backlog.md).
diff --git a/src/netcross_core/tshark_stats/conversations.py b/src/netcross_core/tshark_stats/conversations.py
index eed9d03f..8cd9f383 100644
--- a/src/netcross_core/tshark_stats/conversations.py
+++ b/src/netcross_core/tshark_stats/conversations.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.conversations -- adaptateur ``tshark -z conv,``.
diff --git a/src/netcross_core/tshark_stats/dns.py b/src/netcross_core/tshark_stats/dns.py
index af0ff46b..f9c11daa 100644
--- a/src/netcross_core/tshark_stats/dns.py
+++ b/src/netcross_core/tshark_stats/dns.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.dns -- adaptateur ``tshark -z dns,tree``.
diff --git a/src/netcross_core/tshark_stats/endpoints.py b/src/netcross_core/tshark_stats/endpoints.py
index 0936c402..87457266 100644
--- a/src/netcross_core/tshark_stats/endpoints.py
+++ b/src/netcross_core/tshark_stats/endpoints.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.endpoints -- adaptateur ``tshark -z endpoints,``.
diff --git a/src/netcross_core/tshark_stats/http.py b/src/netcross_core/tshark_stats/http.py
index 976eee3b..cf13fd46 100644
--- a/src/netcross_core/tshark_stats/http.py
+++ b/src/netcross_core/tshark_stats/http.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.http -- adaptateur ``tshark -z http,stat``.
diff --git a/src/netcross_core/tshark_stats/io_stat.py b/src/netcross_core/tshark_stats/io_stat.py
index 597eb1d6..765388ca 100644
--- a/src/netcross_core/tshark_stats/io_stat.py
+++ b/src/netcross_core/tshark_stats/io_stat.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.io_stat -- adaptateur ``tshark -z io,stat``.
diff --git a/src/netcross_core/tshark_stats/models.py b/src/netcross_core/tshark_stats/models.py
index f4bff801..011099b2 100644
--- a/src/netcross_core/tshark_stats/models.py
+++ b/src/netcross_core/tshark_stats/models.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.models -- modele commun des statistiques tshark
(Job 19 / issue #20, section 6.19 de features-backlog.md).
diff --git a/src/netcross_core/tshark_stats/parse_utils.py b/src/netcross_core/tshark_stats/parse_utils.py
index a3315dc7..520dfbe3 100644
--- a/src/netcross_core/tshark_stats/parse_utils.py
+++ b/src/netcross_core/tshark_stats/parse_utils.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.parse_utils -- utilitaires de parsing tolerants
pour les sorties texte ``tshark -z``.
diff --git a/src/netcross_core/tshark_stats/protocol_hierarchy.py b/src/netcross_core/tshark_stats/protocol_hierarchy.py
index 2c5830d1..dc004fe4 100644
--- a/src/netcross_core/tshark_stats/protocol_hierarchy.py
+++ b/src/netcross_core/tshark_stats/protocol_hierarchy.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.protocol_hierarchy -- adaptateur ``tshark -z io,phs``.
diff --git a/src/netcross_core/tshark_stats/response_time.py b/src/netcross_core/tshark_stats/response_time.py
index 375431f8..bbc20229 100644
--- a/src/netcross_core/tshark_stats/response_time.py
+++ b/src/netcross_core/tshark_stats/response_time.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.response_time -- adaptateur ``tshark -z ,rtt``.
diff --git a/src/netcross_core/tshark_stats/runner.py b/src/netcross_core/tshark_stats/runner.py
index 2bfcc4cc..041a0f3f 100644
--- a/src/netcross_core/tshark_stats/runner.py
+++ b/src/netcross_core/tshark_stats/runner.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.runner -- invocation de ``tshark -z``.
diff --git a/src/netcross_core/voip.py b/src/netcross_core/voip.py
index 26d44516..442e535f 100644
--- a/src/netcross_core/voip.py
+++ b/src/netcross_core/voip.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Analyse VoIP orientee appel, association SIP/RTP par SDP.
Cette couche fusionne les informations SIP et RTP deja extraites par le
diff --git a/src/netcross_core/wireshark_expert.py b/src/netcross_core/wireshark_expert.py
index 068540c1..ce5992c6 100644
--- a/src/netcross_core/wireshark_expert.py
+++ b/src/netcross_core/wireshark_expert.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.wireshark_expert -- Session 1 de FEATURES.md section 13.3
("exploitation de l'expertise Wireshark/TShark") : convertit les signaux
diff --git a/src/netcross_gtk4/__init__.py b/src/netcross_gtk4/__init__.py
index c2eccdc3..6366dce3 100644
--- a/src/netcross_gtk4/__init__.py
+++ b/src/netcross_gtk4/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
from netcross_core.logging_config import get_logger
logger = get_logger(__name__)
diff --git a/src/netcross_gtk4/advanced_options.py b/src/netcross_gtk4/advanced_options.py
index 28325d1b..74e6ec8a 100644
--- a/src/netcross_gtk4/advanced_options.py
+++ b/src/netcross_gtk4/advanced_options.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.advanced_options -- options d'analyse avancees de la GUI
(issue #672), sans GTK.
diff --git a/src/netcross_gtk4/ai_settings.py b/src/netcross_gtk4/ai_settings.py
index 5c497d42..4bcb71d0 100644
--- a/src/netcross_gtk4/ai_settings.py
+++ b/src/netcross_gtk4/ai_settings.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.ai_settings -- module IA local dans la GUI (issue #866).
Equivalent GUI des options ``--ai-*`` de la CLI (issue #146), avec les
diff --git a/src/netcross_gtk4/analysis_pipeline.py b/src/netcross_gtk4/analysis_pipeline.py
index d4031cd1..2ab197d5 100644
--- a/src/netcross_gtk4/analysis_pipeline.py
+++ b/src/netcross_gtk4/analysis_pipeline.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.analysis_pipeline -- pipeline d'analyse extrait de MainWindow
(issue #246, #285 -- lot supplémentaire).
diff --git a/src/netcross_gtk4/annotations_panel.py b/src/netcross_gtk4/annotations_panel.py
index 3f67eeb2..f6fcc4d2 100644
--- a/src/netcross_gtk4/annotations_panel.py
+++ b/src/netcross_gtk4/annotations_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.annotations_panel -- panneau GTK des annotations (issue #363).
Cablage GTK de `annotations_view` (Job 40 / issue #160) :
diff --git a/src/netcross_gtk4/annotations_view.py b/src/netcross_gtk4/annotations_view.py
index d4562831..9777bfc3 100644
--- a/src/netcross_gtk4/annotations_view.py
+++ b/src/netcross_gtk4/annotations_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.annotations_view -- logique de presentation pour
l'etiquetage/signets sur paquets (Job 40 / issue #160, section
"Metadonnees et annotation").
diff --git a/src/netcross_gtk4/app.py b/src/netcross_gtk4/app.py
index dd2c181f..6261e65a 100644
--- a/src/netcross_gtk4/app.py
+++ b/src/netcross_gtk4/app.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.app -- interface GTK4 pour netcross_core / netcross_report.
diff --git a/src/netcross_gtk4/batch_window.py b/src/netcross_gtk4/batch_window.py
index bf7ccb21..9e5434f7 100644
--- a/src/netcross_gtk4/batch_window.py
+++ b/src/netcross_gtk4/batch_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.batch_window -- fenetre « Analyse d'un dossier » (issue
#872), equivalent de ``cross_capture_batch_cli.py`` : choix du dossier,
regroupement, nombre de taches, sortie, avancement ligne a ligne.
diff --git a/src/netcross_gtk4/bpf_panel.py b/src/netcross_gtk4/bpf_panel.py
index 6b2adb3b..178f1fcf 100644
--- a/src/netcross_gtk4/bpf_panel.py
+++ b/src/netcross_gtk4/bpf_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Decisions du panneau de filtres BPF de la capture live, sorties de
``netcross_gtk4/app.py`` (issue #285, quatrieme lot).
diff --git a/src/netcross_gtk4/capture_list.py b/src/netcross_gtk4/capture_list.py
index c3800c58..087dc838 100644
--- a/src/netcross_gtk4/capture_list.py
+++ b/src/netcross_gtk4/capture_list.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Enumeration, ordre et retrait des lignes des panneaux de captures, sortis de
``netcross_gtk4/app.py`` (issue #285, cinquieme lot).
diff --git a/src/netcross_gtk4/capture_tools_window.py b/src/netcross_gtk4/capture_tools_window.py
index 505b6ecd..befb8281 100644
--- a/src/netcross_gtk4/capture_tools_window.py
+++ b/src/netcross_gtk4/capture_tools_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.capture_tools_window -- fenetre « Outils de capture »
(issues #868, #869, #870, #886, #887) : fusion, decoupage, conversion,
export filtre et recalage temporel, equivalents des modes utilitaires de
diff --git a/src/netcross_gtk4/client_compare_panel.py b/src/netcross_gtk4/client_compare_panel.py
index cd9e9a09..9a1d7bd6 100644
--- a/src/netcross_gtk4/client_compare_panel.py
+++ b/src/netcross_gtk4/client_compare_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.client_compare_panel -- panneau GTK « Comparaison de
postes » de la page Resultats (issue #675).
diff --git a/src/netcross_gtk4/client_compare_view.py b/src/netcross_gtk4/client_compare_view.py
index f51fe71b..14f8fc95 100644
--- a/src/netcross_gtk4/client_compare_view.py
+++ b/src/netcross_gtk4/client_compare_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.client_compare_view -- comparaison de postes dans la GUI
(issue #675).
diff --git a/src/netcross_gtk4/dashboard_context.py b/src/netcross_gtk4/dashboard_context.py
index 44644b56..7823d037 100644
--- a/src/netcross_gtk4/dashboard_context.py
+++ b/src/netcross_gtk4/dashboard_context.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.dashboard_context -- alias de netcross_core.dashboard.
diff --git a/src/netcross_gtk4/diff_pipeline.py b/src/netcross_gtk4/diff_pipeline.py
index 22f70ce3..c7461186 100644
--- a/src/netcross_gtk4/diff_pipeline.py
+++ b/src/netcross_gtk4/diff_pipeline.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.diff_pipeline -- pipeline de comparaison baseline/courant
extrait de MainWindow._run_diff_thread (issue #246, #285 -- lot supplémentaire).
diff --git a/src/netcross_gtk4/duplicate_view.py b/src/netcross_gtk4/duplicate_view.py
index 9effb9bd..d2bdb52f 100644
--- a/src/netcross_gtk4/duplicate_view.py
+++ b/src/netcross_gtk4/duplicate_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Presentation helpers for cross-capture duplicate detection (Job 41).
Pure Python: no GTK import, so the formatting logic can be tested without a
diff --git a/src/netcross_gtk4/expertise_panel.py b/src/netcross_gtk4/expertise_panel.py
index 794d5576..0ed0be84 100644
--- a/src/netcross_gtk4/expertise_panel.py
+++ b/src/netcross_gtk4/expertise_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.expertise_panel -- panneau « Expertise (exports JSON) » de la
page Resultats (issue #673).
diff --git a/src/netcross_gtk4/expertise_view.py b/src/netcross_gtk4/expertise_view.py
index a532018f..8629381a 100644
--- a/src/netcross_gtk4/expertise_view.py
+++ b/src/netcross_gtk4/expertise_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.expertise_view -- sections d'expertise de l'analyse simple
(issue #673), sans GTK.
diff --git a/src/netcross_gtk4/extraction_panel.py b/src/netcross_gtk4/extraction_panel.py
index 0d8b7195..a1b3d719 100644
--- a/src/netcross_gtk4/extraction_panel.py
+++ b/src/netcross_gtk4/extraction_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.extraction_panel -- panneau GTK « Contenus (extraction) »
de la page Resultats (issue #675).
diff --git a/src/netcross_gtk4/extraction_view.py b/src/netcross_gtk4/extraction_view.py
index dcd48743..c3edf398 100644
--- a/src/netcross_gtk4/extraction_view.py
+++ b/src/netcross_gtk4/extraction_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.extraction_view -- extraction des contenus depuis la GUI
(issue #675).
diff --git a/src/netcross_gtk4/file_option.py b/src/netcross_gtk4/file_option.py
index 40d4d762..742ed953 100644
--- a/src/netcross_gtk4/file_option.py
+++ b/src/netcross_gtk4/file_option.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.file_option -- champ « fichier facultatif » de la
configuration : bouton de choix, « Retirer », nom du fichier retenu.
diff --git a/src/netcross_gtk4/forensic_panel.py b/src/netcross_gtk4/forensic_panel.py
index 93479a5f..6d98b656 100644
--- a/src/netcross_gtk4/forensic_panel.py
+++ b/src/netcross_gtk4/forensic_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.forensic_panel -- panneau GTK « Recherche forensic » de la
page Resultats (issue #675).
diff --git a/src/netcross_gtk4/forensic_view.py b/src/netcross_gtk4/forensic_view.py
index 010f401a..17176c1b 100644
--- a/src/netcross_gtk4/forensic_view.py
+++ b/src/netcross_gtk4/forensic_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.forensic_view -- recherche forensic de la GUI (issue #675).
Equivalent GUI de ``--forensic-search`` et des criteres ``--search-*`` de
diff --git a/src/netcross_gtk4/history_window.py b/src/netcross_gtk4/history_window.py
index 5bafad96..5b499b52 100644
--- a/src/netcross_gtk4/history_window.py
+++ b/src/netcross_gtk4/history_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.history_window -- fenetre « Historique des runs »
(issue #874) : consultation d'une base ``--history-db`` sans relancer
d'analyse, avec les filtres de ``netcross-history`` (``--run-type``,
diff --git a/src/netcross_gtk4/live_capture_points.py b/src/netcross_gtk4/live_capture_points.py
index 07c47588..a056c8cb 100644
--- a/src/netcross_gtk4/live_capture_points.py
+++ b/src/netcross_gtk4/live_capture_points.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.live_capture_points -- points de capture en direct de la
GUI (Job 48, issue #168) : une ligne du panneau de capture live peut
porter PLUSIEURS interfaces d'une meme machine ("eth0, eth1"), chacune
diff --git a/src/netcross_gtk4/live_report_session.py b/src/netcross_gtk4/live_report_session.py
index 4ddda97d..8ec9ecf9 100644
--- a/src/netcross_gtk4/live_report_session.py
+++ b/src/netcross_gtk4/live_report_session.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.live_report_session -- rapport HTML rafraichi en continu
pendant une capture en direct de la GUI (issue #676).
diff --git a/src/netcross_gtk4/lua_doc_view.py b/src/netcross_gtk4/lua_doc_view.py
index c13be2a1..0b11a119 100644
--- a/src/netcross_gtk4/lua_doc_view.py
+++ b/src/netcross_gtk4/lua_doc_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.lua_doc_view -- logique sans GTK de la fenetre
« Documentation Lua » (issue #873), equivalent de ``netcross-lua-doc``.
diff --git a/src/netcross_gtk4/lua_doc_window.py b/src/netcross_gtk4/lua_doc_window.py
index 87702acb..970ac8b6 100644
--- a/src/netcross_gtk4/lua_doc_window.py
+++ b/src/netcross_gtk4/lua_doc_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.lua_doc_window -- fenetre « Documentation Lua » (issue
#873) : equivalent GUI de ``netcross-lua-doc``. Logique dans
``lua_doc_view``. Issue #917 : mode « Dissecteurs Lua » (catalogue,
diff --git a/src/netcross_gtk4/netflow_panel.py b/src/netcross_gtk4/netflow_panel.py
index 27777b7c..c99d4e3c 100644
--- a/src/netcross_gtk4/netflow_panel.py
+++ b/src/netcross_gtk4/netflow_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.netflow_panel -- panneau GTK « NetFlow v5 » de la page
Resultats (issue #675).
diff --git a/src/netcross_gtk4/netflow_view.py b/src/netcross_gtk4/netflow_view.py
index 497a52da..7374b5cc 100644
--- a/src/netcross_gtk4/netflow_view.py
+++ b/src/netcross_gtk4/netflow_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.netflow_view -- resume NetFlow v5 dans la GUI (issue #675).
Equivalent GUI de ``--netflow [EXPORTATEUR=]FICHIER`` (repete),
diff --git a/src/netcross_gtk4/notifications.py b/src/netcross_gtk4/notifications.py
index 0ae0e5cf..c7072fcf 100644
--- a/src/netcross_gtk4/notifications.py
+++ b/src/netcross_gtk4/notifications.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.notifications -- notifications sortantes (webhook, Slack,
courriel) apres une analyse de la GUI (issue #676).
diff --git a/src/netcross_gtk4/panel_state.py b/src/netcross_gtk4/panel_state.py
index 290efe3f..a8fa70d5 100644
--- a/src/netcross_gtk4/panel_state.py
+++ b/src/netcross_gtk4/panel_state.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.panel_state -- decisions de visibilite, de sensibilite et de
selection des panneaux de la GUI (issue #285, troisieme lot).
diff --git a/src/netcross_gtk4/plugin_settings.py b/src/netcross_gtk4/plugin_settings.py
index d0766a97..0e066e5a 100644
--- a/src/netcross_gtk4/plugin_settings.py
+++ b/src/netcross_gtk4/plugin_settings.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.plugin_settings -- plugins tiers dans la GUI (issue #867).
Equivalent GUI de ``--plugins``, ``--plugin-path``, ``--plugin-export`` et
diff --git a/src/netcross_gtk4/report_exports.py b/src/netcross_gtk4/report_exports.py
index c78e8bb2..46704289 100644
--- a/src/netcross_gtk4/report_exports.py
+++ b/src/netcross_gtk4/report_exports.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.report_exports -- diagramme de sequence, export SIEM,
historique SQLite et ticket de support dans la GUI (issue #674), sans GTK.
diff --git a/src/netcross_gtk4/report_exports_panel.py b/src/netcross_gtk4/report_exports_panel.py
index e6077bf0..7acd5618 100644
--- a/src/netcross_gtk4/report_exports_panel.py
+++ b/src/netcross_gtk4/report_exports_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.report_exports_panel -- panneau « SIEM, ticket de support,
historique » de la page Resultats (issue #674).
diff --git a/src/netcross_gtk4/ring_recorders.py b/src/netcross_gtk4/ring_recorders.py
index 6bfc909e..2632c36f 100644
--- a/src/netcross_gtk4/ring_recorders.py
+++ b/src/netcross_gtk4/ring_recorders.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.ring_recorders -- rotation de capture (ring buffer) de la
GUI en capture en direct (issue #676).
diff --git a/src/netcross_gtk4/row_labels.py b/src/netcross_gtk4/row_labels.py
index aa8019ef..3c105883 100644
--- a/src/netcross_gtk4/row_labels.py
+++ b/src/netcross_gtk4/row_labels.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.row_labels -- libelles et cles de tri des lignes affichees
par la GUI (issue #285, premier lot d'extraction de `app.py`).
diff --git a/src/netcross_gtk4/run_outcome.py b/src/netcross_gtk4/run_outcome.py
index 76015515..efb4a829 100644
--- a/src/netcross_gtk4/run_outcome.py
+++ b/src/netcross_gtk4/run_outcome.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.run_outcome -- etat de resultat et decisions d'affichage a la
fin d'une analyse ou d'une comparaison (issue #285, deuxieme lot).
diff --git a/src/netcross_gtk4/security_view.py b/src/netcross_gtk4/security_view.py
index cd40c219..56362bc0 100644
--- a/src/netcross_gtk4/security_view.py
+++ b/src/netcross_gtk4/security_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.security_view -- section Securite de la GUI (issue #357).
Logique sans GTK : texte affiche et export du rapport de securite, a partir
diff --git a/src/netcross_gtk4/stats_view.py b/src/netcross_gtk4/stats_view.py
index d5358f9d..46d74f8c 100644
--- a/src/netcross_gtk4/stats_view.py
+++ b/src/netcross_gtk4/stats_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_gtk4.stats_view -- logique de presentation pour la vue
d'exploration statistique (Job 27 / issue #22, section 6.8).
diff --git a/src/netcross_lua_doc_cli.py b/src/netcross_lua_doc_cli.py
index 412855a0..96b704d0 100644
--- a/src/netcross_lua_doc_cli.py
+++ b/src/netcross_lua_doc_cli.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_lua_doc_cli -- consultation hors ligne de l'API Lua Wireshark
(issue #388, rattachee a #331).
diff --git a/src/netcross_report/__init__.py b/src/netcross_report/__init__.py
index 4a34aa7c..3094ca85 100644
--- a/src/netcross_report/__init__.py
+++ b/src/netcross_report/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_report -- synthese, triage, et generation de rapports (PDF,
JSON) a partir d'un Report netcross_core.
diff --git a/src/netcross_report/batch_runner.py b/src/netcross_report/batch_runner.py
index 5f67d387..80f619cd 100644
--- a/src/netcross_report/batch_runner.py
+++ b/src/netcross_report/batch_runner.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Moteur du mode lot (issues #277, #872), commun à la CLI
(``cross_capture_batch_cli.py``), à l'API (``POST /batches``) et à la GUI.
diff --git a/src/netcross_report/charts.py b/src/netcross_report/charts.py
index 661fa246..83419817 100644
--- a/src/netcross_report/charts.py
+++ b/src/netcross_report/charts.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_report.charts -- graphiques matplotlib exportes en PNG pour le PDF."""
import statistics
diff --git a/src/netcross_report/comm_map.py b/src/netcross_report/comm_map.py
index 949220c8..2bfbe436 100644
--- a/src/netcross_report/comm_map.py
+++ b/src/netcross_report/comm_map.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.comm_map -- cartographie des communications observees
(Job 15/issue #15, FEATURES.md section 6.6).
diff --git a/src/netcross_report/expert_events.py b/src/netcross_report/expert_events.py
index f93591ac..a2efabc4 100644
--- a/src/netcross_report/expert_events.py
+++ b/src/netcross_report/expert_events.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.expert_events -- construit les vues `ExpertEvent`/
`Diagnosis` (Session 36, cinquieme et sixieme objets de contrat de la
diff --git a/src/netcross_report/history.py b/src/netcross_report/history.py
index be617c78..74af8a35 100644
--- a/src/netcross_report/history.py
+++ b/src/netcross_report/history.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.history -- persiste un resume de chaque run (analyse ou
diff) dans une base SQLite locale, pour observer une tendance dans le
diff --git a/src/netcross_report/html_report.py b/src/netcross_report/html_report.py
index dfdc7d24..7ded3ad9 100644
--- a/src/netcross_report/html_report.py
+++ b/src/netcross_report/html_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.html_report -- rapport HTML autonome alimente par le JSON
du rapport (issue #1073, sous-issue 1/6 du chantier #1000).
diff --git a/src/netcross_report/json_report.py b/src/netcross_report/json_report.py
index f1ad0f31..ebdd8e56 100644
--- a/src/netcross_report/json_report.py
+++ b/src/netcross_report/json_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.json_report -- serialise un Report/DiffFinding en JSON
structure, pour l'integration externe (dashboard, ticketing, pipeline
diff --git a/src/netcross_report/live_html.py b/src/netcross_report/live_html.py
index 7067ef10..bbfa602d 100644
--- a/src/netcross_report/live_html.py
+++ b/src/netcross_report/live_html.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# ruff: noqa: E501 -- gabarits HTML/JS en ligne, lisibles tels quels
"""
netcross_report.live_html -- issue #274 : page de presentation du rapport
diff --git a/src/netcross_report/lua_dissectors_text.py b/src/netcross_report/lua_dissectors_text.py
index 99bd8f0c..f5411186 100644
--- a/src/netcross_report/lua_dissectors_text.py
+++ b/src/netcross_report/lua_dissectors_text.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_report.lua_dissectors_text -- rendu texte du catalogue des
dissecteurs Lua (issue #917), partagé par ``netcross-lua-doc --dissectors``
et la fenêtre « Documentation Lua » de la GUI. Prend les documents JSON de
diff --git a/src/netcross_report/lua_doc_text.py b/src/netcross_report/lua_doc_text.py
index da139b95..82028653 100644
--- a/src/netcross_report/lua_doc_text.py
+++ b/src/netcross_report/lua_doc_text.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_report.lua_doc_text -- rendu texte de la documentation Lua
Wireshark (``netcross-lua-doc``, issue #388), partage avec la fenetre
« Documentation Lua » de la GUI (issue #873)."""
diff --git a/src/netcross_report/markdown_report.py b/src/netcross_report/markdown_report.py
index b92f326d..a958a0d9 100644
--- a/src/netcross_report/markdown_report.py
+++ b/src/netcross_report/markdown_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.markdown_report -- generation d'un rapport au format Markdown
(issue #761).
diff --git a/src/netcross_report/metric_charts.py b/src/netcross_report/metric_charts.py
index fd60dcd3..0c5b0478 100644
--- a/src/netcross_report/metric_charts.py
+++ b/src/netcross_report/metric_charts.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.metric_charts -- API generique de graphiques : tout
module d'analyse peut produire un graphique a partir d'une MetricSeries
diff --git a/src/netcross_report/metrics_export.py b/src/netcross_report/metrics_export.py
index d3cfa2bd..50ea8f19 100644
--- a/src/netcross_report/metrics_export.py
+++ b/src/netcross_report/metrics_export.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.metrics_export -- catalogue des metriques Prometheus /
OpenMetrics de Netcross et production des series depuis un rapport
diff --git a/src/netcross_report/path_metrics.py b/src/netcross_report/path_metrics.py
index a442c922..0682cbcf 100644
--- a/src/netcross_report/path_metrics.py
+++ b/src/netcross_report/path_metrics.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.path_metrics -- metriques de qualite par segment du chemin
observe (Job 16/issue #12, FEATURES.md section 6.7).
diff --git a/src/netcross_report/pdf.py b/src/netcross_report/pdf.py
index ce10b39e..31002623 100644
--- a/src/netcross_report/pdf.py
+++ b/src/netcross_report/pdf.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.pdf -- assemble le rapport PDF final (synthese, graphiques,
tableaux de detail) a partir d'un Report netcross_core, avec reportlab.
diff --git a/src/netcross_report/rule_engine.py b/src/netcross_report/rule_engine.py
index af5936f8..21621e3c 100644
--- a/src/netcross_report/rule_engine.py
+++ b/src/netcross_report/rule_engine.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.rule_engine -- premier PILOTE du moteur d'EXECUTION
evoque comme premier chantier ouvert par CLAUDE.md/`Prochaine feature`
diff --git a/src/netcross_report/security_html.py b/src/netcross_report/security_html.py
index 305be62b..216a4f0b 100644
--- a/src/netcross_report/security_html.py
+++ b/src/netcross_report/security_html.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.security_html -- rendu HTML du rapport de securite
(issue #218, troisieme sortie apres le texte et le JSON).
diff --git a/src/netcross_report/security_report.py b/src/netcross_report/security_report.py
index ca17324e..854d72f0 100644
--- a/src/netcross_report/security_report.py
+++ b/src/netcross_report/security_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.security_report -- rapport de securite consolide et
tableau de bord (CVE-5, issue #139, parent #133).
diff --git a/src/netcross_report/sequence_view.py b/src/netcross_report/sequence_view.py
index 89cbe0d9..e6b05954 100644
--- a/src/netcross_report/sequence_view.py
+++ b/src/netcross_report/sequence_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.sequence_view -- diagramme de sequence multi-hotes
(Job 14/issue #11, FEATURES.md section 6.5).
diff --git a/src/netcross_report/session_objects.py b/src/netcross_report/session_objects.py
index bbb7830b..89ebc980 100644
--- a/src/netcross_report/session_objects.py
+++ b/src/netcross_report/session_objects.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.session_objects -- construction et rendu CONSOLE des objets
de contrat de la Session 0 (Job 4/issue #13).
diff --git a/src/netcross_report/siem_export.py b/src/netcross_report/siem_export.py
index 834ae503..6fec3214 100644
--- a/src/netcross_report/siem_export.py
+++ b/src/netcross_report/siem_export.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.siem_export -- export des constats de securite pour
integration SIEM : CEF (issue #170), LEEF 2.0 et STIX 2.1 (issue #279).
diff --git a/src/netcross_report/stix_export.py b/src/netcross_report/stix_export.py
index cba36809..453298c0 100644
--- a/src/netcross_report/stix_export.py
+++ b/src/netcross_report/stix_export.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.stix_export -- export STIX 2.1 des constats de securite
(issue #279, sous-issue de #170).
diff --git a/src/netcross_report/synthesis.py b/src/netcross_report/synthesis.py
index b99e99d0..752af9f1 100644
--- a/src/netcross_report/synthesis.py
+++ b/src/netcross_report/synthesis.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.synthesis -- transforme un Report en une liste de constats
(Finding) via des regles et seuils explicites. Chaque Finding est
diff --git a/src/netcross_report/triage.py b/src/netcross_report/triage.py
index adab35fb..717556bb 100644
--- a/src/netcross_report/triage.py
+++ b/src/netcross_report/triage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.triage -- agrege les Finding (ou DiffFinding) produits
par ailleurs pour repondre a une question que synthesis.py ne pose pas :
diff --git a/src/netcross_report/zeek_export.py b/src/netcross_report/zeek_export.py
new file mode 100644
index 00000000..485f0082
--- /dev/null
+++ b/src/netcross_report/zeek_export.py
@@ -0,0 +1,499 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+"""
+netcross_report.zeek_export -- journaux de flux au format Zeek ``conn.log``
+(issue #1115, chantier #1003).
+
+Un enregistrement par connexion ET par point de capture, comme si Zeek avait
+tourne sur chaque sonde : les colonnes standard de ``conn.log`` d'abord, dans
+l'ordre de Zeek, puis des colonnes ``netcross_*`` propres a l'analyse
+multi-points (point, points qui voient la connexion, segment amont, latence
+et paquets perdus sur ce segment, premier segment de perte).
+
+Deux formats :
+
+- **TSV** (defaut de Zeek) : en-tetes ``#separator``, ``#set_separator``,
+ ``#empty_field``, ``#unset_field``, ``#path``, ``#open``, ``#fields``,
+ ``#types``, une ligne par connexion, ``#close`` -- lisible par
+ ``zeek-cut``, Splunk (TA Zeek), Elastic (module Zeek), RITA... ;
+- **JSON** (``LogAscii::use_json=T``) : un objet par ligne, champs non
+ renseignes omis, ensembles en listes.
+
+Les paquets recus sont ceux de l'analyse : apres ``--redact``, adresses et
+noms y sont deja pseudonymises, et l'identifiant ``uid`` est derive des
+valeurs pseudonymisees -- rien de l'adresse reelle ne fuit.
+
+Limites assumees (documentees dans docs/zeek-export.md) : ``orig_bytes`` et
+``resp_bytes`` additionnent la charge utile observee (retransmissions
+comprises, Zeek les deduit des numeros de sequence) ; ``*_ip_bytes`` est la
+longueur de trame ; ``local_orig``, ``local_resp`` et ``missed_bytes`` ne
+sont pas renseignes ; ``service`` n'est rempli que si un champ applicatif
+dissequé l'atteste (pas de deduction par numero de port, comme Zeek).
+
+Usage :
+
+ from netcross_report.zeek_export import build_conn_records, write_zeek_conn
+
+ records = build_conn_records(packets, points, points_order)
+ write_zeek_conn(records, "conn.log", fmt="tsv") # ou "json"
+"""
+
+from __future__ import annotations
+
+import datetime as _dt
+import hashlib
+import json
+import statistics
+from collections.abc import Iterable, Sequence
+from dataclasses import dataclass, field
+from pathlib import Path
+from typing import cast
+
+from netcross_core.logging_config import get_logger, summarize
+from netcross_core.models import Pkt
+
+logger = get_logger(__name__)
+
+ZEEK_FORMATS = ("tsv", "json")
+
+# Colonnes standard de Zeek conn.log (base/protocols/conn/main.zeek), dans
+# l'ordre de Zeek -- les outils qui lisent par position s'y retrouvent.
+ZEEK_STANDARD_FIELDS: tuple[tuple[str, str], ...] = (
+ ("ts", "time"),
+ ("uid", "string"),
+ ("id.orig_h", "addr"),
+ ("id.orig_p", "port"),
+ ("id.resp_h", "addr"),
+ ("id.resp_p", "port"),
+ ("proto", "enum"),
+ ("service", "string"),
+ ("duration", "interval"),
+ ("orig_bytes", "count"),
+ ("resp_bytes", "count"),
+ ("conn_state", "string"),
+ ("local_orig", "bool"),
+ ("local_resp", "bool"),
+ ("missed_bytes", "count"),
+ ("history", "string"),
+ ("orig_pkts", "count"),
+ ("orig_ip_bytes", "count"),
+ ("resp_pkts", "count"),
+ ("resp_ip_bytes", "count"),
+ ("tunnel_parents", "set[string]"),
+)
+
+# Colonnes propres a Netcross, toujours APRES les colonnes standard.
+NETCROSS_FIELDS: tuple[tuple[str, str], ...] = (
+ ("netcross_point", "string"),
+ ("netcross_points", "set[string]"),
+ ("netcross_segment", "string"),
+ ("netcross_segment_delay_ms", "double"),
+ ("netcross_segment_lost_pkts", "count"),
+ ("netcross_loss_segment", "string"),
+)
+
+ZEEK_FIELDS = ZEEK_STANDARD_FIELDS + NETCROSS_FIELDS
+
+# Protocoles Netcross -> enum transport_proto de Zeek. ARP, STP et IP sans
+# transport connu n'ont pas de connexion au sens de Zeek : ignores.
+_PROTO_MAP = {"TCP": "tcp", "UDP": "udp", "ICMP": "icmp", "ICMPv6": "icmp"}
+
+_TCP_FLAG_NAMES = ("URG", "ACK", "PSH", "RST", "SYN", "FIN")
+
+# Echappement TSV de Zeek : separateur, fins de ligne et antislash en \xNN.
+_TSV_ESCAPE = str.maketrans({"\\": "\\x5c", "\t": "\\x09", "\n": "\\x0a", "\r": "\\x0d"})
+_SET_ESCAPE = str.maketrans({"\\": "\\x5c", "\t": "\\x09", "\n": "\\x0a", "\r": "\\x0d", ",": "\\x2c"})
+
+_BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+
+
+@dataclass
+class ZeekConn:
+ """Une connexion vue a un point de capture (une ligne de conn.log)."""
+
+ point: str
+ proto: str
+ orig_h: str
+ orig_p: int | None
+ resp_h: str
+ resp_p: int | None
+ ts: float
+ last_ts: float
+ uid: str = ""
+ service: str | None = None
+ orig_bytes: int = 0
+ resp_bytes: int = 0
+ orig_pkts: int = 0
+ resp_pkts: int = 0
+ orig_ip_bytes: int = 0
+ resp_ip_bytes: int = 0
+ conn_state: str = "OTH"
+ history: str = ""
+ points_seen: tuple[str, ...] = ()
+ segment: str | None = None
+ segment_delay_ms: float | None = None
+ segment_lost_pkts: int | None = None
+ loss_segment: str | None = None
+ _orig_flags: set[str] = field(default_factory=set, repr=False)
+ _resp_flags: set[str] = field(default_factory=set, repr=False)
+ _orig_data: bool = field(default=False, repr=False)
+ _resp_data: bool = field(default=False, repr=False)
+
+ def values(self) -> dict[str, object]:
+ """Valeurs par nom de colonne Zeek ; ``None`` = champ non renseigne."""
+ logger.debug("ZeekConn.values: point={} proto={}", self.point, self.proto)
+ out: dict[str, object] = {
+ "ts": self.ts,
+ "uid": self.uid,
+ "id.orig_h": self.orig_h,
+ "id.orig_p": self.orig_p,
+ "id.resp_h": self.resp_h,
+ "id.resp_p": self.resp_p,
+ "proto": self.proto,
+ "service": self.service,
+ "duration": max(0.0, self.last_ts - self.ts),
+ "orig_bytes": self.orig_bytes,
+ "resp_bytes": self.resp_bytes,
+ "conn_state": self.conn_state,
+ "local_orig": None,
+ "local_resp": None,
+ "missed_bytes": None,
+ "history": self.history,
+ "orig_pkts": self.orig_pkts,
+ "orig_ip_bytes": self.orig_ip_bytes,
+ "resp_pkts": self.resp_pkts,
+ "resp_ip_bytes": self.resp_ip_bytes,
+ "tunnel_parents": (),
+ "netcross_point": self.point,
+ "netcross_points": self.points_seen,
+ "netcross_segment": self.segment,
+ "netcross_segment_delay_ms": self.segment_delay_ms,
+ "netcross_segment_lost_pkts": self.segment_lost_pkts,
+ "netcross_loss_segment": self.loss_segment,
+ }
+ logger.debug("ZeekConn.values: retour {} champ(s)", len(out))
+ return out
+
+
+def tcp_flag_names(flags: str | None) -> frozenset[str]:
+ """Noms des drapeaux TCP d'une chaine ``Pkt.flags``.
+
+ Accepte les deux formes rencontrees : ``tcp.flags.str`` de tshark
+ (positionnelle, les six derniers caracteres sont U A P R S F, un point
+ ou ``·`` quand le drapeau est absent) et les noms en clair
+ (``"SYN,ACK"``), employes par certains tests et imports.
+ """
+ if not flags:
+ names: frozenset[str] = frozenset()
+ elif any(name in flags for name in _TCP_FLAG_NAMES):
+ names = frozenset(name for name in _TCP_FLAG_NAMES if name in flags)
+ else:
+ tail = flags[-6:].rjust(6)
+ names = frozenset(name for name, ch in zip(_TCP_FLAG_NAMES, tail, strict=True) if ch.isalpha())
+ logger.debug("tcp_flag_names: retour {}", sorted(names))
+ return names
+
+
+def _service(pk: Pkt) -> str | None:
+ """Service applicatif atteste par un champ dissequé (``None`` sinon)."""
+ if pk.dns_qry_name or pk.dns_txn_id is not None:
+ service = "dns"
+ elif pk.tls_client_hello or pk.tls_server_hello or pk.tls_application_data:
+ service = "ssl"
+ elif pk.http_is_request or pk.http_is_response:
+ service = "http"
+ elif pk.sip_call_id or pk.sip_msg_type:
+ service = "sip"
+ elif pk.dhcp_msg_type is not None:
+ service = "dhcp"
+ elif pk.ssh_hassh:
+ service = "ssh"
+ else:
+ service = None
+ logger.debug("_service: retour {}", service)
+ return service
+
+
+def _uid(point: str, proto: str, orig: tuple[str, int | None], resp: tuple[str, int | None], ts: float) -> str:
+ """Identifiant de connexion stable facon Zeek (``C`` + 17 caracteres base 62).
+
+ Derive des valeurs deja pseudonymisees (``--redact``) : il ne revele
+ rien de plus que les colonnes de la ligne, et deux exports d'une meme
+ capture donnent les memes identifiants (comparables d'un run a l'autre).
+ """
+ digest = hashlib.sha256(f"{point}|{proto}|{orig}|{resp}|{ts:.6f}".encode()).digest()
+ n = int.from_bytes(digest[:13], "big")
+ chars = []
+ for _ in range(17):
+ n, rem = divmod(n, 62)
+ chars.append(_BASE62[rem])
+ uid = "C" + "".join(chars)
+ logger.debug("_uid: retour uid (point={}, proto={})", point, proto)
+ return uid
+
+
+def _conn_state(conn: ZeekConn) -> str:
+ """Etat de connexion Zeek (sous-ensemble : S0, S1, SF, REJ, RSTO, RSTR, SH, OTH)."""
+ o, r = conn._orig_flags, conn._resp_flags
+ if conn.proto != "tcp":
+ state = "SF" if conn.resp_pkts else "S0"
+ elif "SYN" in o and not ({"SYN", "ACK"} <= r):
+ if "RST" in r:
+ state = "REJ"
+ elif "FIN" in o:
+ state = "SH"
+ else:
+ state = "S0"
+ elif "SYN" in o:
+ if "RST" in o:
+ state = "RSTO"
+ elif "RST" in r:
+ state = "RSTR"
+ elif "FIN" in o and "FIN" in r:
+ state = "SF"
+ else:
+ state = "S1"
+ else:
+ state = "OTH"
+ logger.debug("_conn_state: retour {}", state)
+ return state
+
+
+def _segments(order: Sequence[str]) -> dict[str, str]:
+ """Point -> point immediatement en amont dans ``--order``."""
+ logger.debug("_segments: order={}", summarize(list(order), "order"))
+ seg = {order[i]: order[i - 1] for i in range(1, len(order))}
+ logger.debug("_segments: retour {} segment(s)", len(seg))
+ return seg
+
+
+def build_conn_records(
+ packets: Iterable[Pkt],
+ points: Sequence[str],
+ points_order: Sequence[str] | None = None,
+) -> list[ZeekConn]:
+ """Agrege les paquets en connexions Zeek, une par (connexion, point).
+
+ Une connexion est identifiee par protocole et couple de points
+ d'extremite non oriente (ICMP : couple d'adresses). L'initiateur est
+ l'emetteur du SYN sans ACK s'il est vu, sinon celui du premier paquet.
+
+ Les colonnes ``netcross_segment*`` ne sont remplies que si un ordre de
+ chemin (``--order``) est fourni : le segment d'une ligne relie le point
+ immediatement en amont au point de la ligne. Les paquets perdus sur ce
+ segment sont ceux vus en amont et absents a ce point (meme convention
+ que le comptage de pertes du rapport) ; la latence est la mediane des
+ ecarts entre les deux observations d'un meme paquet. Les paquets
+ marques doublons (``is_duplicate``) sont ignores.
+ """
+ logger.debug(
+ "build_conn_records: points={} points_order={}",
+ summarize(list(points), "points"),
+ summarize(list(points_order or ()), "points_order"),
+ )
+ # (cle de connexion) -> {point: [paquets]} ; cle de paquet -> {point: ts}
+ by_conn: dict[tuple, dict[str, list[Pkt]]] = {}
+ for pk in packets:
+ proto = _PROTO_MAP.get(pk.proto)
+ if proto is None or not pk.src or not pk.dst or pk.is_duplicate:
+ continue
+ a: tuple[str, int | None] = (pk.src, None if proto == "icmp" else pk.sport)
+ b: tuple[str, int | None] = (pk.dst, None if proto == "icmp" else pk.dport)
+ ends = (a, b) if (a[0], a[1] or 0) <= (b[0], b[1] or 0) else (b, a)
+ by_conn.setdefault((proto, ends), {}).setdefault(pk.point, []).append(pk)
+
+ segments = _segments(points_order) if points_order else {}
+ order = list(points_order) if points_order else list(points)
+ records: list[ZeekConn] = []
+ for (proto, _ends), per_point in by_conn.items():
+ all_pkts = sorted((p for pk_list in per_point.values() for p in pk_list), key=lambda p: p.ts)
+ first = all_pkts[0]
+ if proto == "tcp":
+ syn = next(
+ (p for p in all_pkts if tcp_flag_names(p.flags) >= {"SYN"} and "ACK" not in tcp_flag_names(p.flags)),
+ None,
+ )
+ first = syn or first
+ orig_h = first.src
+ if proto == "icmp":
+ orig = (first.src, first.icmp_type)
+ resp = (first.dst, first.icmp_code)
+ else:
+ orig = (first.src, first.sport)
+ resp = (first.dst, first.dport)
+ points_seen = tuple(p for p in order if p in per_point) + tuple(sorted(p for p in per_point if p not in order))
+
+ # Observations par paquet (direction + cle) pour les colonnes de segment.
+ obs: dict[str, dict[tuple, float]] = {}
+ if segments:
+ for point, pk_list in per_point.items():
+ d = obs.setdefault(point, {})
+ for p in pk_list:
+ d.setdefault((p.src, p.sport, p.dst, p.dport, p.key_id, p.payload_hash), p.ts)
+ loss_segment = None
+ for point in order[1:]:
+ up = segments.get(point)
+ if up in obs and any(k not in obs.get(point, {}) for k in obs[up]):
+ loss_segment = f"{up}->{point}"
+ break
+
+ for point, pk_list in per_point.items():
+ pk_list.sort(key=lambda p: p.ts)
+ conn = ZeekConn(
+ point=point,
+ proto=proto,
+ orig_h=orig[0],
+ orig_p=orig[1],
+ resp_h=resp[0],
+ resp_p=resp[1],
+ ts=pk_list[0].ts,
+ last_ts=pk_list[-1].ts,
+ points_seen=points_seen,
+ loss_segment=loss_segment,
+ )
+ seen_letters: list[str] = []
+ for p in pk_list:
+ from_orig = p.src == orig_h
+ payload = (p.tcp_len if p.tcp_len is not None else p.payload_len) or 0
+ names = tcp_flag_names(p.flags) if proto == "tcp" else frozenset()
+ if from_orig:
+ conn.orig_pkts += 1
+ conn.orig_bytes += payload
+ conn.orig_ip_bytes += p.length or 0
+ conn._orig_flags |= names
+ else:
+ conn.resp_pkts += 1
+ conn.resp_bytes += payload
+ conn.resp_ip_bytes += p.length or 0
+ conn._resp_flags |= names
+ if conn.service is None:
+ conn.service = _service(p)
+ # historique Zeek : majuscule = initiateur, minuscule = repondeur,
+ # chaque lettre une fois par sens (sans les repetitions de Zeek).
+ letters = []
+ if "SYN" in names:
+ letters.append("H" if "ACK" in names else "S")
+ if "FIN" in names:
+ letters.append("F")
+ if "RST" in names:
+ letters.append("R")
+ if payload:
+ letters.append("D")
+ elif "ACK" in names and not names & {"SYN", "FIN", "RST"}:
+ letters.append("A")
+ for letter in letters:
+ letter = letter if from_orig else letter.lower()
+ if letter not in seen_letters:
+ seen_letters.append(letter)
+ conn.history = "".join(seen_letters)
+ conn.conn_state = _conn_state(conn)
+ conn.uid = _uid(point, proto, orig, resp, conn.ts)
+ up = segments.get(point)
+ if up is not None:
+ conn.segment = f"{up}->{point}"
+ here = obs.get(point, {})
+ upstream = obs.get(up, {})
+ conn.segment_lost_pkts = sum(1 for k in upstream if k not in here)
+ deltas = [abs(here[k] - upstream[k]) * 1000.0 for k in upstream if k in here]
+ conn.segment_delay_ms = statistics.median(deltas) if deltas else None
+ records.append(conn)
+
+ records.sort(key=lambda c: (c.ts, c.point, c.uid))
+ logger.debug("build_conn_records: retour {} enregistrement(s)", len(records))
+ return records
+
+
+def _tsv_value(value: object, zeek_type: str) -> str:
+ """Valeur au format TSV de Zeek (``-`` non renseigne, ``(empty)`` vide)."""
+ if value is None:
+ out = "-"
+ elif zeek_type.startswith("set["):
+ items = [str(v).translate(_SET_ESCAPE) for v in cast("Iterable[object]", value)]
+ out = ",".join(items) if items else "(empty)"
+ elif zeek_type in ("time", "interval"):
+ out = f"{float(value):.6f}" # type: ignore[arg-type]
+ elif zeek_type == "double":
+ out = f"{float(value):.3f}" # type: ignore[arg-type]
+ else:
+ text = str(value)
+ out = text.translate(_TSV_ESCAPE) if text else "(empty)"
+ logger.debug("_tsv_value: retour ({})", zeek_type)
+ return out
+
+
+def _zeek_time(ts: float) -> str:
+ """Horodatage des lignes ``#open``/``#close`` (``%Y-%m-%d-%H-%M-%S``, UTC)."""
+ logger.debug("_zeek_time: ts={}", ts)
+ out = _dt.datetime.fromtimestamp(ts, tz=_dt.UTC).strftime("%Y-%m-%d-%H-%M-%S")
+ logger.debug("_zeek_time: retour {}", out)
+ return out
+
+
+def to_tsv(records: Sequence[ZeekConn]) -> str:
+ """``conn.log`` au format TSV de Zeek, en-tetes et ``#close`` compris.
+
+ ``#open`` et ``#close`` portent les bornes des captures (premier et
+ dernier paquet) plutot que l'heure de l'export : deux exports d'une meme
+ capture sont identiques octet pour octet.
+ """
+ logger.debug("to_tsv: records={}", len(records))
+ if records:
+ opened = _zeek_time(min(r.ts for r in records))
+ closed = _zeek_time(max(r.last_ts for r in records))
+ else:
+ opened = closed = _zeek_time(0.0)
+ lines = [
+ "#separator \\x09",
+ "#set_separator\t,",
+ "#empty_field\t(empty)",
+ "#unset_field\t-",
+ "#path\tconn",
+ f"#open\t{opened}",
+ "#fields\t" + "\t".join(name for name, _t in ZEEK_FIELDS),
+ "#types\t" + "\t".join(t for _n, t in ZEEK_FIELDS),
+ ]
+ for rec in records:
+ values = rec.values()
+ lines.append("\t".join(_tsv_value(values[name], t) for name, t in ZEEK_FIELDS))
+ lines.append(f"#close\t{closed}")
+ out = "\n".join(lines) + "\n"
+ logger.debug("to_tsv: retour {} ligne(s)", len(lines))
+ return out
+
+
+def to_json_lines(records: Sequence[ZeekConn]) -> str:
+ """``conn.log`` au format JSON de Zeek : un objet par ligne.
+
+ Comme ``LogAscii::use_json=T`` : champs non renseignes omis, ensembles en
+ listes (omis s'ils sont vides), ``ts`` en secondes flottantes.
+ """
+ logger.debug("to_json_lines: records={}", len(records))
+ lines = []
+ for rec in records:
+ obj: dict[str, object] = {}
+ values = rec.values()
+ for name, zeek_type in ZEEK_FIELDS:
+ value = values[name]
+ if value is None:
+ continue
+ if zeek_type.startswith("set["):
+ if not value:
+ continue
+ value = list(value) # type: ignore[call-overload]
+ obj[name] = value
+ lines.append(json.dumps(obj, ensure_ascii=False, separators=(",", ":")))
+ out = "".join(line + "\n" for line in lines)
+ logger.debug("to_json_lines: retour {} ligne(s)", len(lines))
+ return out
+
+
+def write_zeek_conn(records: Sequence[ZeekConn], output_path: str | Path, fmt: str = "tsv") -> str:
+ """Ecrit ``conn.log`` (``fmt`` : ``tsv`` ou ``json``) et retourne le chemin."""
+ logger.debug("write_zeek_conn: records={} output_path={} fmt={}", len(records), output_path, fmt)
+ if fmt not in ZEEK_FORMATS:
+ logger.debug("write_zeek_conn: format inconnu {}", fmt)
+ raise ValueError(f"format Zeek inconnu : {fmt!r} (attendu : {', '.join(ZEEK_FORMATS)})")
+ text = to_tsv(records) if fmt == "tsv" else to_json_lines(records)
+ path = Path(output_path)
+ path.write_text(text, encoding="utf-8")
+ logger.debug("write_zeek_conn: retour {}", path)
+ return str(path)
diff --git a/src/pcap_parser/__init__.py b/src/pcap_parser/__init__.py
index 432daa5e..ad8d33ef 100644
--- a/src/pcap_parser/__init__.py
+++ b/src/pcap_parser/__init__.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser -- decodage de captures reseau via tshark -T ek (moteur
Wireshark en ligne de commande).
diff --git a/src/pcap_parser/capfile.py b/src/pcap_parser/capfile.py
index afa08f02..f24a14db 100644
--- a/src/pcap_parser/capfile.py
+++ b/src/pcap_parser/capfile.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capfile -- couche 1 bis : cadrage binaire minimal des
fichiers pcap / pcapng. AUCUNE dissection : on ne lit que la structure
diff --git a/src/pcap_parser/capinfos_source.py b/src/pcap_parser/capinfos_source.py
index 4006b15d..62036d61 100644
--- a/src/pcap_parser/capinfos_source.py
+++ b/src/pcap_parser/capinfos_source.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capinfos_source -- lecture du commentaire de SECTION pcapng
(Section Header Block, "capture comment") d'un fichier de capture, via
diff --git a/src/pcap_parser/capture.py b/src/pcap_parser/capture.py
index 63ef4522..ce905c49 100644
--- a/src/pcap_parser/capture.py
+++ b/src/pcap_parser/capture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capture -- couche 6 (orchestration) : point d'entree public
du package. Compose les couches du dessous (ek_source -> packet) pour
diff --git a/src/pcap_parser/ek_fields.py b/src/pcap_parser/ek_fields.py
index 269fcecc..0df08b56 100644
--- a/src/pcap_parser/ek_fields.py
+++ b/src/pcap_parser/ek_fields.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.ek_fields -- couche 2 : acces bas niveau aux champs d'un
paquet EK. Aucune connaissance protocolaire ici, juste les mecanismes
diff --git a/src/pcap_parser/ek_source.py b/src/pcap_parser/ek_source.py
index ba8a6dee..59e5d1fa 100644
--- a/src/pcap_parser/ek_source.py
+++ b/src/pcap_parser/ek_source.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.ek_source -- couche 1 : execution de tshark -T ek et lecture
du flux NDJSON qui en resulte, fichier pcap ou interface live.
diff --git a/src/pcap_parser/packet.py b/src/pcap_parser/packet.py
index 51cbb66f..8de98d01 100644
--- a/src/pcap_parser/packet.py
+++ b/src/pcap_parser/packet.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.packet -- couche 5 : assemblage d'un RawPacket normalise a
partir des couches EK d'un paquet, une fois l'encapsulation detectee
diff --git a/src/pcap_parser/protocols.py b/src/pcap_parser/protocols.py
index 2d65fef1..577eb6ce 100644
--- a/src/pcap_parser/protocols.py
+++ b/src/pcap_parser/protocols.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.protocols -- couche 4 : RTP / DHCP / SIP (et SDP).
diff --git a/src/pcap_parser/radio.py b/src/pcap_parser/radio.py
index db1f5846..30848883 100644
--- a/src/pcap_parser/radio.py
+++ b/src/pcap_parser/radio.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""pcap_parser.radio -- metadonnees radio 802.11 par paquet (issue #1142).
Premiere brique du chantier « Wi-Fi en mode moniteur » (#1006) : une
diff --git a/src/pcap_parser/remote.py b/src/pcap_parser/remote.py
index e0017f8f..6078a1f0 100644
--- a/src/pcap_parser/remote.py
+++ b/src/pcap_parser/remote.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""pcap_parser.remote -- sources de capture distantes (issue #166).
Le champ « interface » d'une capture en direct accepte, en plus d'un nom
diff --git a/src/pcap_parser/tunnels.py b/src/pcap_parser/tunnels.py
index 43d51496..59e1dbe6 100644
--- a/src/pcap_parser/tunnels.py
+++ b/src/pcap_parser/tunnels.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.tunnels -- couche 3 : detection de la pile d'encapsulation
(VLAN/MPLS/GRE/VXLAN/GTP-U/ERSPAN/CAPWAP) et selection de la couche
diff --git a/tests/_fake_sklearn.py b/tests/_fake_sklearn.py
index 864e0744..763fe838 100644
--- a/tests/_fake_sklearn.py
+++ b/tests/_fake_sklearn.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Fake sklearn module injected into sys.modules for coverage of the
ML-dependent code paths (anomaly.py, flow_classifier.py) when scikit-learn
is not installed in the test environment.
diff --git a/tests/conftest.py b/tests/conftest.py
index 0b06a06a..de8d7f6d 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Fixtures et fabriques partagees par toute la suite de tests.
diff --git a/tests/gtk4_display.py b/tests/gtk4_display.py
index 296d6067..ed093d7e 100644
--- a/tests/gtk4_display.py
+++ b/tests/gtk4_display.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Garde commune des tests GTK4 : pygobject, GTK4 ET un affichage réel.
Les tests pilotés via pygobject (#357, #363, lots de #421) doivent être
diff --git a/tests/pcap_builders.py b/tests/pcap_builders.py
index 6ae88f5f..773be93a 100644
--- a/tests/pcap_builders.py
+++ b/tests/pcap_builders.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Fabriques et lecteurs pcap / pcapng SYNTHETIQUES pour les tests de
decoupage (test_capfile.py, test_split_capture.py) : aucun outil externe
diff --git a/tests/radiotap_reference.py b/tests/radiotap_reference.py
index a657bbd6..39c22231 100644
--- a/tests/radiotap_reference.py
+++ b/tests/radiotap_reference.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Generateur des captures 802.11 de reference versionnees (issue #1142).
Trames entierement synthetiques, ecrites a la main octet par octet pour
diff --git a/tests/test_active_planner.py b/tests/test_active_planner.py
index 30258cde..b942c919 100644
--- a/tests/test_active_planner.py
+++ b/tests/test_active_planner.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests du planificateur de mesures actives (issue #1063) -- sans reseau."""
from __future__ import annotations
diff --git a/tests/test_adjust_cli.py b/tests/test_adjust_cli.py
index 2f0889ed..d237fd7e 100644
--- a/tests/test_adjust_cli.py
+++ b/tests/test_adjust_cli.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de l'integration CLI de --adjust-time-output (issue #165, Job 45).
On simule editcap (absente dans le CI) et on verifie la logique de
diff --git a/tests/test_adjust_timestamps.py b/tests/test_adjust_timestamps.py
index 8b2679bf..b871fb4d 100644
--- a/tests/test_adjust_timestamps.py
+++ b/tests/test_adjust_timestamps.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de pcap_parser.capture.adjust_timestamps / first_timestamp (Job 45,
issue #165) et de la CLI --adjust-time-output.
diff --git a/tests/test_advanced_cli_outputs.py b/tests/test_advanced_cli_outputs.py
index 6351cae4..3c0f7c2e 100644
--- a/tests/test_advanced_cli_outputs.py
+++ b/tests/test_advanced_cli_outputs.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issues #359, #360, #361 : chronologie des flux, recherche forensique et
statistiques tshark accessibles depuis le CLI, avec sortie JSON.
diff --git a/tests/test_ai_model_pack.py b/tests/test_ai_model_pack.py
index 495c5a41..4d2c7fd9 100644
--- a/tests/test_ai_model_pack.py
+++ b/tests/test_ai_model_pack.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #271 : paquets de modeles partageables (ZIP anonyme, verifie) et
boite d'envoi hors connexion. Aucun test ne necessite scikit-learn ni le
reseau (is_online est simule)."""
diff --git a/tests/test_ai_models_cli_coverage.py b/tests/test_ai_models_cli_coverage.py
index c56e49f0..4801f1d4 100644
--- a/tests/test_ai_models_cli_coverage.py
+++ b/tests/test_ai_models_cli_coverage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #696 (suite de #665) : branches restantes de ``netcross_ai_models_cli``.
Complete ``tests/test_ai_model_pack.py`` (parcours nominal) : description du
diff --git a/tests/test_ai_module.py b/tests/test_ai_module.py
index 39a17808..08f4de3f 100644
--- a/tests/test_ai_module.py
+++ b/tests/test_ai_module.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #146 (FLOW-5) : module IA/ML optionnel et local.
Les tests ML sont ignores si scikit-learn est absent ; le reste (features,
diff --git a/tests/test_alarms.py b/tests/test_alarms.py
index f2627fd7..3b4cb7ad 100644
--- a/tests/test_alarms.py
+++ b/tests/test_alarms.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.alarms -- tests du moteur d'alarmes et surveillance de
seuils (§6.16, issue #26).
diff --git a/tests/test_analysis.py b/tests/test_analysis.py
index ebb76142..9efcc7c3 100644
--- a/tests/test_analysis.py
+++ b/tests/test_analysis.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.analysis.analyse -- coeur analytique. On construit des
flux synthetiques a 2 ou 3 points de capture et on verifie les
diff --git a/tests/test_analysis_couverture.py b/tests/test_analysis_couverture.py
index d29effbf..a57c5e73 100644
--- a/tests/test_analysis_couverture.py
+++ b/tests/test_analysis_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de couverture de netcross_core/analysis.py (issue #697, suite #665).
Chemins rares, testes directement sur les fonctions internes :
diff --git a/tests/test_analysis_pipeline.py b/tests/test_analysis_pipeline.py
index e175fdb7..e52f3204 100644
--- a/tests/test_analysis_pipeline.py
+++ b/tests/test_analysis_pipeline.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests pour les pipelines d'analyse et de diff extraits de app.py (#246, #285).
Ces tests vérifient la logique pure extraite de MainWindow._run_analysis_thread
diff --git a/tests/test_analysis_pipeline_couverture.py b/tests/test_analysis_pipeline_couverture.py
index 6e56279b..829c89e0 100644
--- a/tests/test_analysis_pipeline_couverture.py
+++ b/tests/test_analysis_pipeline_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de couverture de netcross_gtk4/analysis_pipeline.py (issue #711, suite #665).
Chemins rares, sans GTK ni tshark (tout est doublé) :
diff --git a/tests/test_analyzer_cli_auxiliaires.py b/tests/test_analyzer_cli_auxiliaires.py
index f5b71556..c214d0b2 100644
--- a/tests/test_analyzer_cli_auxiliaires.py
+++ b/tests/test_analyzer_cli_auxiliaires.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de couverture des fonctions auxiliaires de
cross_capture_analyzer_cli.py (issue #678, suite #665).
diff --git a/tests/test_analyzer_cli_bout_en_bout.py b/tests/test_analyzer_cli_bout_en_bout.py
index ad71f8f0..db4960be 100644
--- a/tests/test_analyzer_cli_bout_en_bout.py
+++ b/tests/test_analyzer_cli_bout_en_bout.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de couverture de main() dans cross_capture_analyzer_cli.py
(issue #678, suite #665).
diff --git a/tests/test_analyzer_cli_couverture_678.py b/tests/test_analyzer_cli_couverture_678.py
index 9d905e85..5c7e02d3 100644
--- a/tests/test_analyzer_cli_couverture_678.py
+++ b/tests/test_analyzer_cli_couverture_678.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #678 (suite #665) : branches restantes de cross_capture_analyzer_cli.py.
Complete tests/test_analyzer_cli_auxiliaires.py : chemins nominaux « sans
diff --git a/tests/test_analyzer_cli_coverage.py b/tests/test_analyzer_cli_coverage.py
index b9f708b6..b18db813 100644
--- a/tests/test_analyzer_cli_coverage.py
+++ b/tests/test_analyzer_cli_coverage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests supplementaires pour cross_capture_analyzer_cli.py -- issue #287.
diff --git a/tests/test_annotations_store.py b/tests/test_annotations_store.py
index eaa76878..364c8126 100644
--- a/tests/test_annotations_store.py
+++ b/tests/test_annotations_store.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""AnnotationStore : persistance GUI des annotations par capture (issue #363).
Logique sans GTK du panneau `netcross_gtk4.annotations_panel` : chargement
diff --git a/tests/test_annotations_view.py b/tests/test_annotations_view.py
index f377b9b8..dc320fba 100644
--- a/tests/test_annotations_view.py
+++ b/tests/test_annotations_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""tests/test_annotations_view.py -- tests du module
netcross_gtk4.annotations_view (Job 40/issue #160).
diff --git a/tests/test_api.py b/tests/test_api.py
index b60e8257..ec529cc5 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_api -- tests (issue #209).
diff --git a/tests/test_api_advanced_options.py b/tests/test_api_advanced_options.py
index 03b376ea..55a56255 100644
--- a/tests/test_api_advanced_options.py
+++ b/tests/test_api_advanced_options.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des options d'analyse avancées de l'API (issue #672).
diff --git a/tests/test_api_app_gardes.py b/tests/test_api_app_gardes.py
index 370de4d3..c4ded4f4 100644
--- a/tests/test_api_app_gardes.py
+++ b/tests/test_api_app_gardes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #736 : gardes de netcross_api/app.py non atteintes par les tests
HTTP (repli ImportError QUIC, erreurs d'analyse, nom de fichier vide)."""
diff --git a/tests/test_api_comparisons.py b/tests/test_api_comparisons.py
index bec3d6b9..19861549 100644
--- a/tests/test_api_comparisons.py
+++ b/tests/test_api_comparisons.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des routes de comparaison baseline/courant de l'API (issue #669).
diff --git a/tests/test_api_deploiement.py b/tests/test_api_deploiement.py
index a07f4c02..4e5a4255 100644
--- a/tests/test_api_deploiement.py
+++ b/tests/test_api_deploiement.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""API deployable (issue #356) : jeton, limite d'upload, analyse en tache
de fond avec statut, persistance SQLite optionnelle.
diff --git a/tests/test_api_expertise.py b/tests/test_api_expertise.py
index 0fcd759a..c1a7076a 100644
--- a/tests/test_api_expertise.py
+++ b/tests/test_api_expertise.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests pour l'issue #673 : sections d'expertise dans l'API."""
from __future__ import annotations
diff --git a/tests/test_api_exports.py b/tests/test_api_exports.py
index c6bd8d4e..91baf552 100644
--- a/tests/test_api_exports.py
+++ b/tests/test_api_exports.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des exports texte, PDF et CSV de l'API (issue #670).
diff --git a/tests/test_api_issue_675.py b/tests/test_api_issue_675.py
index 552e884d..23c947e4 100644
--- a/tests/test_api_issue_675.py
+++ b/tests/test_api_issue_675.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : API recherche forensique, extraction, comparaison, NetFlow.
Tests des endpoints POST /analyses/{id}/search, /extract, /client-diff, /netflow.
diff --git a/tests/test_api_multi_files.py b/tests/test_api_multi_files.py
index e85563b0..0cf24a81 100644
--- a/tests/test_api_multi_files.py
+++ b/tests/test_api_multi_files.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests pour l'issue #671 : plusieurs fichiers par point et split_interfaces."""
from __future__ import annotations
diff --git a/tests/test_api_multipoint.py b/tests/test_api_multipoint.py
index 07d18349..6e74e0c3 100644
--- a/tests/test_api_multipoint.py
+++ b/tests/test_api_multipoint.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""POST /captures/multi : analyse croisee entre points via l'API (issue #354).
parse_capture est remplace par des paquets synthetiques par etiquette :
diff --git a/tests/test_api_options.py b/tests/test_api_options.py
index 3b0ce565..42625fcb 100644
--- a/tests/test_api_options.py
+++ b/tests/test_api_options.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #330 (écart 2 de docs/parite-surfaces.md) : options d'analyse de
l'API, mêmes noms et même sens que la CLI (nat_tolerant, nat_window_ms,
diff --git a/tests/test_api_rapport_structure.py b/tests/test_api_rapport_structure.py
index f5ebfdf7..b80ac241 100644
--- a/tests/test_api_rapport_structure.py
+++ b/tests/test_api_rapport_structure.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #330 (écart 1 de docs/parite-surfaces.md) : l'API sert le même
rapport structuré que ``netcross --json-report`` et l'export JSON de la GUI.
diff --git a/tests/test_api_reglages.py b/tests/test_api_reglages.py
index d1f76496..1de2effc 100644
--- a/tests/test_api_reglages.py
+++ b/tests/test_api_reglages.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #330 (suite de l'écart 2) : réglages d'analyse de l'API déjà
présents en GUI et en CLI -- bucket_ms, rtp_clock_rate,
diff --git a/tests/test_api_sequence_siem.py b/tests/test_api_sequence_siem.py
index 8ea26799..976bc65f 100644
--- a/tests/test_api_sequence_siem.py
+++ b/tests/test_api_sequence_siem.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests pour l'issue #674 : diagramme de séquence, SIEM, ticket de support."""
from __future__ import annotations
diff --git a/tests/test_app_gtk4_lot1.py b/tests/test_app_gtk4_lot1.py
index c9dd92d4..fd800adc 100644
--- a/tests/test_app_gtk4_lot1.py
+++ b/tests/test_app_gtk4_lot1.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests GTK4 de CaptureRow et du debut de LiveCaptureRow (issue #422,
lot 1/N de #421), pilotes via pygobject.
diff --git a/tests/test_app_gtk4_lot10.py b/tests/test_app_gtk4_lot10.py
index 74202d9c..704441aa 100644
--- a/tests/test_app_gtk4_lot10.py
+++ b/tests/test_app_gtk4_lot10.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests app.py -- Lot 10/10 : fin export securite + NetcrossApp/main
(issue #431, sous-issue de #421).
diff --git a/tests/test_app_gtk4_lot2.py b/tests/test_app_gtk4_lot2.py
index 82ea14d7..0c205362 100644
--- a/tests/test_app_gtk4_lot2.py
+++ b/tests/test_app_gtk4_lot2.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Couverture GTK4 de app.py, lot 2 (issue #423, sous-issue de #421).
Portee : LiveCaptureRow (menu de filtres BPF, popover de sauvegarde,
diff --git a/tests/test_app_gtk4_lot3.py b/tests/test_app_gtk4_lot3.py
index b9f14b2b..008bded1 100644
--- a/tests/test_app_gtk4_lot3.py
+++ b/tests/test_app_gtk4_lot3.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests app.py -- lot 3/10 (issue #424, sous-issue de #421) : listes de
captures + bascules de MainWindow (lignes 479-1073).
diff --git a/tests/test_app_gtk4_lot4.py b/tests/test_app_gtk4_lot4.py
index cebe3062..803af074 100644
--- a/tests/test_app_gtk4_lot4.py
+++ b/tests/test_app_gtk4_lot4.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Lot 4/10 de couverture de netcross_gtk4/app.py (issue #425, sous-issue de
#421) : `add_capture_row`, `_log`, `on_run_analysis` et
diff --git a/tests/test_app_gtk4_lot5.py b/tests/test_app_gtk4_lot5.py
index e5f38c4b..93ac9e78 100644
--- a/tests/test_app_gtk4_lot5.py
+++ b/tests/test_app_gtk4_lot5.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Couverture GTK4 de app.py, lot 5 (issue #426, sous-issue de #421).
Portee (lignes 1545-1718) : cycle de vie complet d'une capture en direct --
diff --git a/tests/test_app_gtk4_lot6.py b/tests/test_app_gtk4_lot6.py
index 82f73f3a..119e937f 100644
--- a/tests/test_app_gtk4_lot6.py
+++ b/tests/test_app_gtk4_lot6.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests app.py -- lot 6/10 (issue #427, sous-issue de #421) : threads
d'analyse/diff + export CSV/PDF, pilotes via pygobject.
diff --git a/tests/test_app_gtk4_lot7.py b/tests/test_app_gtk4_lot7.py
index 56196321..7a536307 100644
--- a/tests/test_app_gtk4_lot7.py
+++ b/tests/test_app_gtk4_lot7.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Couverture GTK4 de app.py, lot 7 (issue #428, sous-issue de #421).
Portee : export PDF (_on_pdf_path_chosen, export_pdf_to) et panneau
diff --git a/tests/test_app_gtk4_lot8.py b/tests/test_app_gtk4_lot8.py
index 37f0f5c2..ba11e950 100644
--- a/tests/test_app_gtk4_lot8.py
+++ b/tests/test_app_gtk4_lot8.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Couverture GTK4 de app.py, lot 8 (issue #429, sous-issue de #421).
Portee : export JSON des statistiques (_on_stats_export_json,
diff --git a/tests/test_app_gtk4_lot9.py b/tests/test_app_gtk4_lot9.py
index c7cd5eca..92cdbdeb 100644
--- a/tests/test_app_gtk4_lot9.py
+++ b/tests/test_app_gtk4_lot9.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests app.py -- Lot 9/10 (issue #430, sous-issue de #421) : cartographie des
communications, threads d'export PDF/JSON, declenchement de l'export
diff --git a/tests/test_application.py b/tests/test_application.py
index 309aaa2c..7305f17c 100644
--- a/tests/test_application.py
+++ b/tests/test_application.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_application -- tests du modèle transactionnel applicatif
(Job 23, §6.9/§6.10).
diff --git a/tests/test_asset_inventory_report.py b/tests/test_asset_inventory_report.py
index a911ee2b..ab6c621a 100644
--- a/tests/test_asset_inventory_report.py
+++ b/tests/test_asset_inventory_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #350 : l'inventaire d'actifs (#151) est calcule, compare a la
baseline d'hotes connus (--known-hosts) et rendu partout -- rapport de
diff --git a/tests/test_banners.py b/tests/test_banners.py
index 86a68dd3..2cfce1a7 100644
--- a/tests/test_banners.py
+++ b/tests/test_banners.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.application.banners -- tests de l'extraction passive des
bannieres de versions et de la construction de
diff --git a/tests/test_banners_couverture.py b/tests/test_banners_couverture.py
index 35828a8f..9162c321 100644
--- a/tests/test_banners_couverture.py
+++ b/tests/test_banners_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de couverture de netcross_core/application/banners.py (issue #712, suite #665).
Complète tests/test_banners.py par les chemins rares, tous synthétiques
diff --git a/tests/test_baseline_diff.py b/tests/test_baseline_diff.py
index 18fe429c..e87a6a20 100644
--- a/tests/test_baseline_diff.py
+++ b/tests/test_baseline_diff.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.baseline_diff -- compare deux Report deja calcules. On
construit ici directement des Report minimalistes (pas besoin de
diff --git a/tests/test_baseline_diff_coverage.py b/tests/test_baseline_diff_coverage.py
index cd935be7..35e0d5a3 100644
--- a/tests/test_baseline_diff_coverage.py
+++ b/tests/test_baseline_diff_coverage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests supplementaires pour netcross_core/baseline_diff.py -- issue #705 (suite de #665).
diff --git a/tests/test_baseline_profile.py b/tests/test_baseline_profile.py
index 0af2ec04..88e59bda 100644
--- a/tests/test_baseline_profile.py
+++ b/tests/test_baseline_profile.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_baseline_profile.py -- tests du profil de reference dynamique
(netcross_core.baseline_profile, Job 12/issue #9).
diff --git a/tests/test_batch.py b/tests/test_batch.py
index 71245a31..0f1cb7fb 100644
--- a/tests/test_batch.py
+++ b/tests/test_batch.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Mode batch (issue #277) : regroupement conservateur, justification ecrite,
invariant entrees = groupees + isolees + echecs, et CLI de lot.
diff --git a/tests/test_beaconing.py b/tests/test_beaconing.py
index 03637077..b43597e4 100644
--- a/tests/test_beaconing.py
+++ b/tests/test_beaconing.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.beaconing -- issue #147 (SCENARIO-1) : detection de
beaconing C2. Paquets synthetiques (make_pkt) ; le trafic « legitime » imite
diff --git a/tests/test_bpf_filters.py b/tests/test_bpf_filters.py
index d6914720..f454cdf7 100644
--- a/tests/test_bpf_filters.py
+++ b/tests/test_bpf_filters.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de netcross_core.bpf_filters et de BPFFilter (Job 47 / issue #167) :
sauvegarde/rechargement de filtres BPF dans un fichier JSON sidecar,
diff --git a/tests/test_bpf_panel.py b/tests/test_bpf_panel.py
index ed63d3c7..e69d5e70 100644
--- a/tests/test_bpf_panel.py
+++ b/tests/test_bpf_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des decisions du panneau de filtres BPF (`netcross_gtk4.bpf_panel`,
issue #285, quatrieme lot).
diff --git a/tests/test_capfile.py b/tests/test_capfile.py
index 0a0c2174..13720146 100644
--- a/tests/test_capfile.py
+++ b/tests/test_capfile.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capfile -- cadrage binaire pcap/pcapng et decoupage par
taille (Job 35, issue #155). Aucun outil externe : les fichiers sont
diff --git a/tests/test_capfile_branches.py b/tests/test_capfile_branches.py
index 8a22d0da..08dd18a5 100644
--- a/tests/test_capfile_branches.py
+++ b/tests/test_capfile_branches.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""capfile.py : chemins rares du cadrage binaire pcap/pcapng (issue #747).
Complete `test_capfile.py` : options ou blocs sans rapport avec ce que lit
diff --git a/tests/test_capinfos_source.py b/tests/test_capinfos_source.py
index 221c9c93..d938e6f3 100644
--- a/tests/test_capinfos_source.py
+++ b/tests/test_capinfos_source.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capinfos_source -- lecture du commentaire de section pcapng
via `capinfos -k`. Meme discipline que test_ek_source.py (capinfos,
diff --git a/tests/test_capture.py b/tests/test_capture.py
index c080cd4a..dfff9688 100644
--- a/tests/test_capture.py
+++ b/tests/test_capture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capture -- couche d'orchestration. On monkeypatch
iter_ek_records (jamais tshark lui-meme, cf. les autres fichiers de
diff --git a/tests/test_capture_info.py b/tests/test_capture_info.py
index 6ca561d0..a033794e 100644
--- a/tests/test_capture_info.py
+++ b/tests/test_capture_info.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Job 38/issue #158 -- metadonnees de capture : pcap_parser.capinfos_source.
read_capture_info et pcap_parser.capfile.read_structure.
diff --git a/tests/test_capture_info_integration.py b/tests/test_capture_info_integration.py
index 5a6690c0..0ec0df39 100644
--- a/tests/test_capture_info_integration.py
+++ b/tests/test_capture_info_integration.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests d'intégration du Job 38/issue #158 : metadonnees de capture dans le
Report (champ capture_infos), affichage dans print_report, et fonction
diff --git a/tests/test_capture_list.py b/tests/test_capture_list.py
index eaad558c..e0e08311 100644
--- a/tests/test_capture_list.py
+++ b/tests/test_capture_list.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de l'enumeration, de l'ordre et du retrait des lignes des panneaux de
captures (`netcross_gtk4.capture_list`, issue #285, cinquieme lot).
diff --git a/tests/test_capture_rotation_gui.py b/tests/test_capture_rotation_gui.py
index ea13a62e..2fdcb44b 100644
--- a/tests/test_capture_rotation_gui.py
+++ b/tests/test_capture_rotation_gui.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #671 : dans la GUI, deux lignes de meme nom forment un seul point
(capture en rotation, comme ``--capture NOM=a,b`` de la CLI)."""
diff --git a/tests/test_capture_segments.py b/tests/test_capture_segments.py
index f928b217..916f42a7 100644
--- a/tests/test_capture_segments.py
+++ b/tests/test_capture_segments.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Captures segmentees (rotation tcpdump/tshark) sur --capture
(cross_capture_analyzer_cli.py) et --baseline/--current
diff --git a/tests/test_capwap_validation.py b/tests/test_capwap_validation.py
index b427b0fc..15eed66a 100644
--- a/tests/test_capwap_validation.py
+++ b/tests/test_capwap_validation.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_capwap_validation.py — Validation de la détection CAPWAP/DTLS
(issue #29).
diff --git a/tests/test_causality.py b/tests/test_causality.py
index 69008a15..13905829 100644
--- a/tests/test_causality.py
+++ b/tests/test_causality.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_causality.py -- tests du moteur de correlation causale
(netcross_core.causality, Job 4/issue #4).
diff --git a/tests/test_charts.py b/tests/test_charts.py
index 5d33ae39..349facb0 100644
--- a/tests/test_charts.py
+++ b/tests/test_charts.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des graphiques (`netcross_report/charts.py`) -- issue #286.
diff --git a/tests/test_check_branch_protection.py b/tests/test_check_branch_protection.py
index fdef16cd..bc20dcbf 100644
--- a/tests/test_check_branch_protection.py
+++ b/tests/test_check_branch_protection.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de scripts/check_branch_protection.py (protection de dev, #334).
Reseau exclu, comme pour scripts/pr_coverage_comment.py : l'etat de la
diff --git a/tests/test_checksums.py b/tests/test_checksums.py
index 0019033c..be5d9a0f 100644
--- a/tests/test_checksums.py
+++ b/tests/test_checksums.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Checksums IP/TCP/UDP (Job 43, issue #163).
diff --git a/tests/test_class_diagram.py b/tests/test_class_diagram.py
index ba7a72ba..bebafd7e 100644
--- a/tests/test_class_diagram.py
+++ b/tests/test_class_diagram.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de scripts/generate_class_diagram.py et de docs/class-diagram.md (issue #140).
Le diagramme de classes est GENERE depuis src/ et rafraichi par le hook
diff --git a/tests/test_cli_entrypoints.py b/tests/test_cli_entrypoints.py
index 5f7cb6b8..1ab6ebe3 100644
--- a/tests/test_cli_entrypoints.py
+++ b/tests/test_cli_entrypoints.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des points d'entree CLI -- issue #287.
diff --git a/tests/test_client_diff.py b/tests/test_client_diff.py
index e3d78165..cd15c4ce 100644
--- a/tests/test_client_diff.py
+++ b/tests/test_client_diff.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.client_diff -- comparaison "client vs client". On
construit des Pkt synthetiques (make_pkt) avec des src/dst distincts par
diff --git a/tests/test_clock_sync.py b/tests/test_clock_sync.py
index e5898eef..906a11f9 100644
--- a/tests/test_clock_sync.py
+++ b/tests/test_clock_sync.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de l'estimation robuste du decalage et de la derive d'horloge
(issue #996) : estimateur isole (clock_sync.py) et integration dans
diff --git a/tests/test_comm_map.py b/tests/test_comm_map.py
index 92dd16a0..516c2e3c 100644
--- a/tests/test_comm_map.py
+++ b/tests/test_comm_map.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de netcross_report.comm_map (cartographie des communications,
issue #15) et du rendu charts.chart_comm_map.
diff --git a/tests/test_compliance.py b/tests/test_compliance.py
index e194bf3f..8c89dc77 100644
--- a/tests/test_compliance.py
+++ b/tests/test_compliance.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.compliance -- evaluate_compliance() (Session 36, objets
ReferenceProfile/ComplianceResult de la Session 0). Verifie le calcul des
diff --git a/tests/test_compliance_catalog.py b/tests/test_compliance_catalog.py
index 8225537e..20ae5775 100644
--- a/tests/test_compliance_catalog.py
+++ b/tests/test_compliance_catalog.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_compliance_catalog.py -- tests du catalogue de referentiels
techniques enrichi (netcross_core.compliance, Job 10/issue #7).
diff --git a/tests/test_compliance_deviation.py b/tests/test_compliance_deviation.py
index c199cad7..30f3e2f7 100644
--- a/tests/test_compliance_deviation.py
+++ b/tests/test_compliance_deviation.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_compliance_deviation.py -- tests du statut DEVIATION
(netcross_core.compliance, Job 11/issue #8).
diff --git a/tests/test_config.py b/tests/test_config.py
index 6df61319..97d1c057 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.config -- tests (issue #170).
diff --git a/tests/test_content.py b/tests/test_content.py
index 75fff1bb..bff37617 100644
--- a/tests/test_content.py
+++ b/tests/test_content.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
from netcross_core.content import extract_http_objects
from netcross_core.models import Pkt
diff --git a/tests/test_content_extraction.py b/tests/test_content_extraction.py
index 9822538f..ab388ded 100644
--- a/tests/test_content_extraction.py
+++ b/tests/test_content_extraction.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #278 : extraction des contenus (audio, video, documents),
analyse qualitative et rappel de l'usage raisonne. Sans tshark : les
datagrammes sont fabriques, tshark --export-objects est simule."""
diff --git a/tests/test_content_extraction_pcap.py b/tests/test_content_extraction_pcap.py
index 7757f5be..5c3bc7e9 100644
--- a/tests/test_content_extraction_pcap.py
+++ b/tests/test_content_extraction_pcap.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #278 de bout en bout sur une vraie capture (tshark requis, CI) :
SIP/SDP + RTP G.711 avec pertes, et un PDF telecharge en HTTP."""
diff --git a/tests/test_convert_capture.py b/tests/test_convert_capture.py
index 25fca1c2..9cbe50f1 100644
--- a/tests/test_convert_capture.py
+++ b/tests/test_convert_capture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capture.convert_capture / export_csv / export_json
(Job 49, issue #169) -- conversion de formats et export structure.
diff --git a/tests/test_convert_capture_pcap.py b/tests/test_convert_capture_pcap.py
index 9960c016..f6c9d6b3 100644
--- a/tests/test_convert_capture_pcap.py
+++ b/tests/test_convert_capture_pcap.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #169 : conversion et exports sur un vrai tshark (CI uniquement).
La capture source est construite octet par octet (tests/pcap_builders) ;
diff --git a/tests/test_correlate.py b/tests/test_correlate.py
index e8c54248..0716684b 100644
--- a/tests/test_correlate.py
+++ b/tests/test_correlate.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
from conftest import make_pkt
from netcross_core.correlate import (
diff --git a/tests/test_cross_capture_duplicates.py b/tests/test_cross_capture_duplicates.py
index 9e06e73d..1f3b8be4 100644
--- a/tests/test_cross_capture_duplicates.py
+++ b/tests/test_cross_capture_duplicates.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Job 41/issue #161 -- detection de doublons inter-captures (multi-point) :
netcross_core.forensic.detect_cross_capture_duplicates(), Pkt.is_duplicate,
diff --git a/tests/test_cve_correlation.py b/tests/test_cve_correlation.py
index 0c48b5dc..d12c4828 100644
--- a/tests/test_cve_correlation.py
+++ b/tests/test_cve_correlation.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_cve_correlation.py -- tests de la base CVE locale et de la
correlation de versions (netcross_core.security, issue #138 / CVE-4).
diff --git a/tests/test_cve_seed.py b/tests/test_cve_seed.py
index 6cf9ea1d..488646c6 100644
--- a/tests/test_cve_seed.py
+++ b/tests/test_cve_seed.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Base CVE minimale embarquee (issue #353).
Sans --cve-db, un Apache 2.4.49 n'etait pas qualifie vulnerable. La base
diff --git a/tests/test_dashboard_context.py b/tests/test_dashboard_context.py
index ef943d70..06be17eb 100644
--- a/tests/test_dashboard_context.py
+++ b/tests/test_dashboard_context.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests pour netcross_gtk4.dashboard_context (issue #18, section 6.17).
diff --git a/tests/test_dashboard_context_coverage.py b/tests/test_dashboard_context_coverage.py
index 99a9867a..cc6fded5 100644
--- a/tests/test_dashboard_context_coverage.py
+++ b/tests/test_dashboard_context_coverage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #698 (suite de #665) : branches restantes de ``netcross_gtk4.dashboard_context``.
Complete ``tests/test_dashboard_context.py`` (scenario reel via ``correlate``)
diff --git a/tests/test_degradation_paths.py b/tests/test_degradation_paths.py
index 30cff4f9..bba8ea4d 100644
--- a/tests/test_degradation_paths.py
+++ b/tests/test_degradation_paths.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests supplémentaires pour les branches de dégradation (#246).
Couvre les chemins d'erreur et les cas limites identifiés dans l'audit
diff --git a/tests/test_detections_rendered.py b/tests/test_detections_rendered.py
index ea5eec8d..acb0f3f8 100644
--- a/tests/test_detections_rendered.py
+++ b/tests/test_detections_rendered.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #329 -- test de non-regression : chaque type de detection produit par
les modules de securite apparait dans au moins un rendu utilisateur, avec un
diff --git a/tests/test_detector_inventory.py b/tests/test_detector_inventory.py
index 1805e2c6..7eadbcef 100644
--- a/tests/test_detector_inventory.py
+++ b/tests/test_detector_inventory.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Inventaire des détecteurs (issue #1020) : aucun oubli, doc à jour."""
from __future__ import annotations
diff --git a/tests/test_dga_fast_flux.py b/tests/test_dga_fast_flux.py
index e5f6c339..e93fcc47 100644
--- a/tests/test_dga_fast_flux.py
+++ b/tests/test_dga_fast_flux.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.dga + fast_flux -- tests (issue #152, SCENARIO-6).
diff --git a/tests/test_diff_cli_coverage.py b/tests/test_diff_cli_coverage.py
index f7ffded6..bec67b48 100644
--- a/tests/test_diff_cli_coverage.py
+++ b/tests/test_diff_cli_coverage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests supplementaires pour cross_capture_diff_cli.py -- issue #287.
diff --git a/tests/test_diff_cli_live.py b/tests/test_diff_cli_live.py
index 97eb721a..a4f0da3f 100644
--- a/tests/test_diff_cli_live.py
+++ b/tests/test_diff_cli_live.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
cross_capture_diff_cli.py -- --live-current (Session 16).
diff --git a/tests/test_diff_cli_sorties.py b/tests/test_diff_cli_sorties.py
index 41b38823..9c7befde 100644
--- a/tests/test_diff_cli_sorties.py
+++ b/tests/test_diff_cli_sorties.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de couverture de cross_capture_diff_cli.py (issue #677, suite #665).
Sorties optionnelles de main() apres la comparaison (triage, TLS, QUIC,
diff --git a/tests/test_discovery.py b/tests/test_discovery.py
index a41d7084..42eb8398 100644
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.discovery -- tests de l'inventaire passif des actifs
reseau (assets.py) et de l'empreinte OS passive (os_detect.py), issue
diff --git a/tests/test_dns_tunnel.py b/tests/test_dns_tunnel.py
index 4309fe8d..f87310cd 100644
--- a/tests/test_dns_tunnel.py
+++ b/tests/test_dns_tunnel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.dns_tunnel -- issue #144 (FLOW-3) : detection de
tunneling DNS. Paquets synthetiques (make_pkt) ; le trafic « legitime »
diff --git a/tests/test_duplicate_view.py b/tests/test_duplicate_view.py
index 6a2e13e8..bdd5c4fc 100644
--- a/tests/test_duplicate_view.py
+++ b/tests/test_duplicate_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for the GTK4 duplicate status formatter.
The formatter is deliberately pure Python, so these tests do not require GTK.
diff --git a/tests/test_ek_fields.py b/tests/test_ek_fields.py
index b14b5830..9d74960f 100644
--- a/tests/test_ek_fields.py
+++ b/tests/test_ek_fields.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.ek_fields -- couche la plus basse, aucune connaissance
protocolaire. Couvre la normalisation couche-unique vs couche-empilee
diff --git a/tests/test_ek_source.py b/tests/test_ek_source.py
index e7e2a0c7..e6be7f66 100644
--- a/tests/test_ek_source.py
+++ b/tests/test_ek_source.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.ek_source -- couche 1 (subprocess tshark). tshark n'etant
disponible dans aucun des environnements ou ce projet a ete developpe
diff --git a/tests/test_exfiltration.py b/tests/test_exfiltration.py
index 1d10f879..c5bab309 100644
--- a/tests/test_exfiltration.py
+++ b/tests/test_exfiltration.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de netcross_core.security.exfiltration (issue #148, SCENARIO-2).
Detection d'exfiltration : volume anormal, ratio asymetrique,
diff --git a/tests/test_expert_correlation.py b/tests/test_expert_correlation.py
index 2eaf68f1..f63ec19e 100644
--- a/tests/test_expert_correlation.py
+++ b/tests/test_expert_correlation.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.expert_correlation -- issue #137 (CVE-3) :
detection de tentatives d'exploitation (fuzzing, overflow, dos) a partir
diff --git a/tests/test_expert_events.py b/tests/test_expert_events.py
index 2d6e7be7..88c4dd06 100644
--- a/tests/test_expert_events.py
+++ b/tests/test_expert_events.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.expert_events -- build_expert_events()/build_diagnoses()
(Session 36, objets de contrat de la Session 0 : ExpertEvent/Diagnosis).
diff --git a/tests/test_expert_model.py b/tests/test_expert_model.py
index 389e4538..bfb95aa0 100644
--- a/tests/test_expert_model.py
+++ b/tests/test_expert_model.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.expert_model -- verifie uniquement la forme du contrat (les
neuf objets de la Session 0 exposent bien les champs decrits par leur
diff --git a/tests/test_expert_rules.py b/tests/test_expert_rules.py
index c70e7273..c338312e 100644
--- a/tests/test_expert_rules.py
+++ b/tests/test_expert_rules.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.expert_rules -- verifie le contrat `Rule` (calque exact sur
le schema de la section 6.2 de FEATURES.md : id/domaine/preconditions/
diff --git a/tests/test_exploit_signatures.py b/tests/test_exploit_signatures.py
index 01fddd6b..0c88462f 100644
--- a/tests/test_exploit_signatures.py
+++ b/tests/test_exploit_signatures.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.exploit_signatures -- detection passive de signatures
d'exploits CVE (issue #136, CVE-2 du chantier #133).
diff --git a/tests/test_export_cli.py b/tests/test_export_cli.py
index 7b2d4dfb..915c7033 100644
--- a/tests/test_export_cli.py
+++ b/tests/test_export_cli.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de la CLI --export-pcap (Job 36, issue #156) : verification des
flags, mutual exclusion et dispatch. tshark est simule (monkeypatch).
diff --git a/tests/test_export_filtered.py b/tests/test_export_filtered.py
index f808d690..33c5fcbe 100644
--- a/tests/test_export_filtered.py
+++ b/tests/test_export_filtered.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de pcap_parser.capture.export_filtered (Job 36, issue #156) et de la
CLI --export-pcap.
diff --git a/tests/test_extract.py b/tests/test_extract.py
index 6186b942..4b4cc7e7 100644
--- a/tests/test_extract.py
+++ b/tests/test_extract.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.extract.carver -- tests (issue #150, SCENARIO-4).
diff --git a/tests/test_fingerprinting.py b/tests/test_fingerprinting.py
index dbe59233..674adc13 100644
--- a/tests/test_fingerprinting.py
+++ b/tests/test_fingerprinting.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.fingerprint -- tests de l'empreinte JA4 (TLS) et HASSH
(SSH), issue #143 (FLOW-2, parent #141).
diff --git a/tests/test_fingerprints_reference.py b/tests/test_fingerprints_reference.py
index 7824ae3a..ddad7a0f 100644
--- a/tests/test_fingerprints_reference.py
+++ b/tests/test_fingerprints_reference.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #259 -- les empreintes JA4/HASSH doivent (a) etre correctes au
regard de l'implementation de reference, (b) atteindre reellement
diff --git a/tests/test_flow_stats.py b/tests/test_flow_stats.py
index efd29fb0..c0d31269 100644
--- a/tests/test_flow_stats.py
+++ b/tests/test_flow_stats.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de netcross_core.security.flow_stats (issue #145, FLOW-4).
Analyse statistique des flux : SPLT, entropie, ratio up/down,
diff --git a/tests/test_flow_timeline.py b/tests/test_flow_timeline.py
index 0de605fb..2ca1cefd 100644
--- a/tests/test_flow_timeline.py
+++ b/tests/test_flow_timeline.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_flow_timeline.py -- tests de la vue temporelle detaillee
(netcross_core.flow_timeline, Job 13/issue #10).
diff --git a/tests/test_flow_view.py b/tests/test_flow_view.py
index 7ccf929a..801890fd 100644
--- a/tests/test_flow_view.py
+++ b/tests/test_flow_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_flow_view.py -- tests du FlowView (netcross_core.flow_view,
Job 9/issue #6).
diff --git a/tests/test_forensic.py b/tests/test_forensic.py
index c891ffa0..e10fca1b 100644
--- a/tests/test_forensic.py
+++ b/tests/test_forensic.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_forensic.py -- tests de l'index de correlation bidirectionnel
(netcross_core.forensic, Job 8/issue #5).
diff --git a/tests/test_forensic_search.py b/tests/test_forensic_search.py
index 38a3a34b..48677dcd 100644
--- a/tests/test_forensic_search.py
+++ b/tests/test_forensic_search.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_forensic_search.py -- tests du moteur de recherche analytique
post-capture transversal (netcross_core.forensic_search, Job 17 / issue #16,
diff --git a/tests/test_gtk4_display.py b/tests/test_gtk4_display.py
index e0ed68a7..abeb4d6a 100644
--- a/tests/test_gtk4_display.py
+++ b/tests/test_gtk4_display.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Garde commune des tests GTK4 (tests/gtk4_display.py).
Sans serveur graphique, un module de test GTK4 doit être SAUTÉ, pas faire
diff --git a/tests/test_gtk4_sans_affichage.py b/tests/test_gtk4_sans_affichage.py
index 203158e7..6b068411 100644
--- a/tests/test_gtk4_sans_affichage.py
+++ b/tests/test_gtk4_sans_affichage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#468 -- lancement de la GUI sans affichage accessible (root, SSH) :
message explicite et code de sortie, pas de trace Gtk-CRITICAL."""
diff --git a/tests/test_gui_annotations_panel.py b/tests/test_gui_annotations_panel.py
index 00813e7c..1cdd6ace 100644
--- a/tests/test_gui_annotations_panel.py
+++ b/tests/test_gui_annotations_panel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Test GUI (pygobject) du panneau d'annotations (issue #363).
Ignore si GTK4/pygobject ou un affichage manquent (CI sans libgtk-4) ;
diff --git a/tests/test_gui_annotations_panel_menu.py b/tests/test_gui_annotations_panel_menu.py
index 01d2707d..cca70cc7 100644
--- a/tests/test_gui_annotations_panel_menu.py
+++ b/tests/test_gui_annotations_panel_menu.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests GUI complementaires du panneau d'annotations (#683).
`tests/test_gui_annotations_panel.py` couvre l'ajout, la relecture, la
diff --git a/tests/test_gui_export_path_logging.py b/tests/test_gui_export_path_logging.py
index a387c181..c283a7bc 100644
--- a/tests/test_gui_export_path_logging.py
+++ b/tests/test_gui_export_path_logging.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Traces loguru des dialogues d'export de la fenêtre GTK (issue #245).
Les callbacks ``_on_pdf_path_chosen``, ``_on_json_path_chosen`` et
diff --git a/tests/test_gui_flow_objects.py b/tests/test_gui_flow_objects.py
index 7dd81fd8..f5daff76 100644
--- a/tests/test_gui_flow_objects.py
+++ b/tests/test_gui_flow_objects.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de regression de l'issue #453 : les flux d'un run existent sous deux
formes dans la GUI, et chaque vue consomme celle qu'elle attend.
diff --git a/tests/test_gui_inventory.py b/tests/test_gui_inventory.py
index 2c92e0dd..f23b522f 100644
--- a/tests/test_gui_inventory.py
+++ b/tests/test_gui_inventory.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests du script d'inventaire de app.py (issue #285)."""
from __future__ import annotations
diff --git a/tests/test_gui_json_parity.py b/tests/test_gui_json_parity.py
index 6e7e6781..7a9eabd1 100644
--- a/tests/test_gui_json_parity.py
+++ b/tests/test_gui_json_parity.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Parite du JSON produit par la GUI et par la CLI (Job 5/issue #14).
diff --git a/tests/test_gui_reglages_fins.py b/tests/test_gui_reglages_fins.py
index db7aafe3..ba2a6cf7 100644
--- a/tests/test_gui_reglages_fins.py
+++ b/tests/test_gui_reglages_fins.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #330 (écart 3 de docs/parite-surfaces.md) : réglages fins de la CLI
dans la GUI -- fenêtre NAT (--nat-window-ms), coupure silencieuse
diff --git a/tests/test_gui_security.py b/tests/test_gui_security.py
index eadfdabb..fdb9aab5 100644
--- a/tests/test_gui_security.py
+++ b/tests/test_gui_security.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Securite dans la GUI (issue #357) : parite avec --security-report.
Le pipeline de la GUI construit le MEME `SecurityReport` que la CLI
diff --git a/tests/test_gui_security_window.py b/tests/test_gui_security_window.py
index cacc6c93..6311a855 100644
--- a/tests/test_gui_security_window.py
+++ b/tests/test_gui_security_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Section Securite de la fenetre GTK (issue #357), pilotee via pygobject.
Ignore si GTK4/pygobject ou un affichage manquent (CI sans libgtk-4) ; la
diff --git a/tests/test_guide_api_champs.py b/tests/test_guide_api_champs.py
index 41325f98..75b91dc3 100644
--- a/tests/test_guide_api_champs.py
+++ b/tests/test_guide_api_champs.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #465 / #841 lot 4 : chaque champ cité dans le tableau « Options
d'analyse » du guide API existe réellement dans l'API.
diff --git a/tests/test_history.py b/tests/test_history.py
index c16cf253..b51880a1 100644
--- a/tests/test_history.py
+++ b/tests/test_history.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.history -- verifie l'enregistrement (record_run/
record_diff_run) et la lecture (list_history/print_history) de
diff --git a/tests/test_history_cli.py b/tests/test_history_cli.py
index bc39d90f..d00c6a61 100644
--- a/tests/test_history_cli.py
+++ b/tests/test_history_cli.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de `cross_history_cli.py` -- issue #287.
diff --git a/tests/test_html_report.py b/tests/test_html_report.py
index 77300e1a..fdfb71a0 100644
--- a/tests/test_html_report.py
+++ b/tests/test_html_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests du rapport HTML autonome (issue #1073)."""
from __future__ import annotations
diff --git a/tests/test_http_transaction_model.py b/tests/test_http_transaction_model.py
index 53a81cd6..4a018721 100644
--- a/tests/test_http_transaction_model.py
+++ b/tests/test_http_transaction_model.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Modèle de transaction HTTP commun et adaptateur HTTP/1.x (issue #1051).
Non-régression : build_http_transactions passe désormais par HttpTransaction ;
diff --git a/tests/test_i18n.py b/tests/test_i18n.py
index ed61c753..f8a86f6b 100644
--- a/tests/test_i18n.py
+++ b/tests/test_i18n.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #299 : internationalisation gettext.
Les verifications de catalogues (synchronisation .po/.pot, en-tetes,
diff --git a/tests/test_instrument_loguru.py b/tests/test_instrument_loguru.py
index 4e0132c5..aa829536 100644
--- a/tests/test_instrument_loguru.py
+++ b/tests/test_instrument_loguru.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#441 : résumé sûr des arguments et instrumentation assistée."""
from __future__ import annotations
diff --git a/tests/test_instrument_sorties.py b/tests/test_instrument_sorties.py
index 3979a0ae..99816506 100644
--- a/tests/test_instrument_sorties.py
+++ b/tests/test_instrument_sorties.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Outil d'instrumentation « un logger.debug() à chaque sortie » (suite #441)."""
from __future__ import annotations
diff --git a/tests/test_issue_346_comptages.py b/tests/test_issue_346_comptages.py
index 2d675bfb..226d0717 100644
--- a/tests/test_issue_346_comptages.py
+++ b/tests/test_issue_346_comptages.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #346 : comptages justes et attribues a un point pour les
mouvements lateraux et flow_stats."""
diff --git a/tests/test_issue_672_api_cve_workers.py b/tests/test_issue_672_api_cve_workers.py
index 83b75132..008ebcb8 100644
--- a/tests/test_issue_672_api_cve_workers.py
+++ b/tests/test_issue_672_api_cve_workers.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #672 (API) : parallel_workers, base CVE NETCROSS_CVE_DB, et note de
troncature de max_packets/sample comme la CLI."""
diff --git a/tests/test_issue_672_gui_options.py b/tests/test_issue_672_gui_options.py
index a6693ef2..362faf8a 100644
--- a/tests/test_issue_672_gui_options.py
+++ b/tests/test_issue_672_gui_options.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #672 : options d'analyse avancees dans la GUI (--max-packets,
--sample, --parallel-workers, --test-net-external, --known-destinations,
--known-hosts, --cve-db). Partie sans GTK, puis fenetre."""
diff --git a/tests/test_issue_673_gui_expertise.py b/tests/test_issue_673_gui_expertise.py
index 8fad7984..a453d5e4 100644
--- a/tests/test_issue_673_gui_expertise.py
+++ b/tests/test_issue_673_gui_expertise.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #673 : sections d'expertise dans la GUI (--rule-engine,
--expert-section, --media-quality, --tshark-stats, --flow-timeline).
Partie sans GTK : reglages, pipeline, documents JSON ; puis panneau GTK."""
diff --git a/tests/test_issue_674_gui_exports.py b/tests/test_issue_674_gui_exports.py
index 74ada6ee..b63f55c3 100644
--- a/tests/test_issue_674_gui_exports.py
+++ b/tests/test_issue_674_gui_exports.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #674 : diagramme de sequence, export SIEM, historique et ticket de
support dans la GUI. Partie sans GTK, puis panneau et fenetre."""
diff --git a/tests/test_issue_675_gui_extraction.py b/tests/test_issue_675_gui_extraction.py
index 30d304fc..4ca2c5ca 100644
--- a/tests/test_issue_675_gui_extraction.py
+++ b/tests/test_issue_675_gui_extraction.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : extraction des contenus depuis la GUI (equivalent de
--extract-contents / --extract-kinds). Partie sans GTK."""
diff --git a/tests/test_issue_675_gui_extraction_window.py b/tests/test_issue_675_gui_extraction_window.py
index 7cfb2024..8699f829 100644
--- a/tests/test_issue_675_gui_extraction_window.py
+++ b/tests/test_issue_675_gui_extraction_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : panneau « Contenus (extraction) » de la page Resultats.
Ignore sans GTK4 ou sans affichage, meme garde que test_app_gtk4_lot4.py.
diff --git a/tests/test_issue_675_gui_netflow.py b/tests/test_issue_675_gui_netflow.py
index fbe244ba..4cccfc39 100644
--- a/tests/test_issue_675_gui_netflow.py
+++ b/tests/test_issue_675_gui_netflow.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : resume NetFlow v5 dans la GUI (equivalent de --netflow /
--netflow-top / JSON de --json-report). Module sans GTK et panneau."""
diff --git a/tests/test_issue_675_gui_postes.py b/tests/test_issue_675_gui_postes.py
index ea918e07..e33b6ecd 100644
--- a/tests/test_issue_675_gui_postes.py
+++ b/tests/test_issue_675_gui_postes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : comparaison de postes dans la GUI (equivalent de
--client-group / --client-reference / --client-diff-csv). Partie sans GTK."""
diff --git a/tests/test_issue_675_gui_postes_window.py b/tests/test_issue_675_gui_postes_window.py
index 971607c0..bf544fde 100644
--- a/tests/test_issue_675_gui_postes_window.py
+++ b/tests/test_issue_675_gui_postes_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : comparaison de postes -- champs de la configuration,
validation avant lancement, panneau « Comparaison de postes » (Resultats).
diff --git a/tests/test_issue_675_gui_recherche.py b/tests/test_issue_675_gui_recherche.py
index b741377d..0e86379f 100644
--- a/tests/test_issue_675_gui_recherche.py
+++ b/tests/test_issue_675_gui_recherche.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : recherche forensic dans la GUI (equivalent de
--forensic-search / --search-*). Partie sans GTK : saisie, mise en forme,
export JSON et index construit par le pipeline."""
diff --git a/tests/test_issue_675_gui_recherche_liens.py b/tests/test_issue_675_gui_recherche_liens.py
index 3f624182..f65d5900 100644
--- a/tests/test_issue_675_gui_recherche_liens.py
+++ b/tests/test_issue_675_gui_recherche_liens.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : resultats de recherche forensic « cliquables vers le flux » --
choix d'un resultat, filtre Wireshark, « Annoter la trame », « Ouvrir dans
Wireshark » (wireshark -r FICHIER -g TRAME)."""
diff --git a/tests/test_issue_675_gui_recherche_window.py b/tests/test_issue_675_gui_recherche_window.py
index 979398a8..c053df96 100644
--- a/tests/test_issue_675_gui_recherche_window.py
+++ b/tests/test_issue_675_gui_recherche_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #675 : panneau « Recherche forensic » (page Resultats) et case
« Index de recherche forensic » (Configuration).
diff --git a/tests/test_issue_676_cli_ring_bpf.py b/tests/test_issue_676_cli_ring_bpf.py
index 1c5ecb42..7e27e78e 100644
--- a/tests/test_issue_676_cli_ring_bpf.py
+++ b/tests/test_issue_676_cli_ring_bpf.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : CLI ring buffer, BPF library, et parite GUI/CLI.
Tests unitaires des nouvelles options CLI --ring-buffer et --bpf-library,
diff --git a/tests/test_issue_676_gui_live_current.py b/tests/test_issue_676_gui_live_current.py
index ce088cc4..c1428bed 100644
--- a/tests/test_issue_676_gui_live_current.py
+++ b/tests/test_issue_676_gui_live_current.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : comparaison d'un baseline enregistre avec un courant capture
en direct dans la GUI (equivalent de --live-current). Partie sans GTK :
pipeline de comparaison avec des paquets deja captures."""
diff --git a/tests/test_issue_676_gui_live_current_window.py b/tests/test_issue_676_gui_live_current_window.py
index c5c7877e..20bb37fd 100644
--- a/tests/test_issue_676_gui_live_current_window.py
+++ b/tests/test_issue_676_gui_live_current_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : comparaison d'un baseline enregistre avec un courant capture
en direct dans la fenetre principale (equivalent de --live-current) :
demarrage, reglages releves, fin de capture -> comparaison.
diff --git a/tests/test_issue_676_gui_live_report.py b/tests/test_issue_676_gui_live_report.py
index e75233cc..b18eeb2d 100644
--- a/tests/test_issue_676_gui_live_report.py
+++ b/tests/test_issue_676_gui_live_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : rapport HTML rafraichi en continu pendant une capture en
direct de la GUI (equivalent de --live-report, --live-report-interval et
--live-report-serve). Module sans GTK : testable sans affichage."""
diff --git a/tests/test_issue_676_gui_live_report_window.py b/tests/test_issue_676_gui_live_report_window.py
index 16dc71b3..d6723be5 100644
--- a/tests/test_issue_676_gui_live_report_window.py
+++ b/tests/test_issue_676_gui_live_report_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : rapport HTML en continu dans la fenetre principale (case,
reglages, demarrage avec la capture en direct, alimentation par les threads
de capture, derniere publication a l'arret).
diff --git a/tests/test_issue_676_gui_notifications.py b/tests/test_issue_676_gui_notifications.py
index 356e6c44..3aa77d01 100644
--- a/tests/test_issue_676_gui_notifications.py
+++ b/tests/test_issue_676_gui_notifications.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : notifications (webhook, Slack, courriel) apres une analyse de
la GUI, equivalent de --notify-on / --notify-webhook / --notify-slack /
--notify-email / --notify-detail. Partie sans GTK : module et pipeline."""
diff --git a/tests/test_issue_676_gui_notifications_window.py b/tests/test_issue_676_gui_notifications_window.py
index 164d6068..a45a42c7 100644
--- a/tests/test_issue_676_gui_notifications_window.py
+++ b/tests/test_issue_676_gui_notifications_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : reglages de notification dans la fenetre principale (menu
« Notifier si », canaux, detail), validation avant lancement et
transmission au thread d'analyse.
diff --git a/tests/test_issue_676_gui_ring_recorders.py b/tests/test_issue_676_gui_ring_recorders.py
index 2e759024..3b7a7c6b 100644
--- a/tests/test_issue_676_gui_ring_recorders.py
+++ b/tests/test_issue_676_gui_ring_recorders.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : rotation de capture de la GUI (netcross_gtk4.ring_recorders,
module sans GTK). tshark n'est jamais lance : starter/stopper simules."""
diff --git a/tests/test_issue_676_ring_recorder.py b/tests/test_issue_676_ring_recorder.py
index 55be84c4..a76537a0 100644
--- a/tests/test_issue_676_ring_recorder.py
+++ b/tests/test_issue_676_ring_recorder.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #676 : --ring-buffer enregistre reellement la capture en rotation.
Avant ce correctif, l'option creait des repertoires temporaires vides et
diff --git a/tests/test_issue_864_markdown.py b/tests/test_issue_864_markdown.py
index c2a47e2d..b4ea04a8 100644
--- a/tests/test_issue_864_markdown.py
+++ b/tests/test_issue_864_markdown.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #864 : export Markdown (--md-report) en GUI et en API."""
from __future__ import annotations
diff --git a/tests/test_issue_865_api_topn.py b/tests/test_issue_865_api_topn.py
index 43e6db50..6ae3401a 100644
--- a/tests/test_issue_865_api_topn.py
+++ b/tests/test_issue_865_api_topn.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #865 : le topn de GET /analyses/{id}/pdf (équivalent de
--topn-charts) change vraiment les graphiques Top-N, comme la CLI."""
diff --git a/tests/test_issue_866_api_ai.py b/tests/test_issue_866_api_ai.py
index a27b66d8..299aceb4 100644
--- a/tests/test_issue_866_api_ai.py
+++ b/tests/test_issue_866_api_ai.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #866 (API) : module IA local sur une analyse terminée.
``POST /analyses/{analysis_id}/ai`` est l'équivalent des options ``--ai-*`` :
diff --git a/tests/test_issue_866_gui_ai.py b/tests/test_issue_866_gui_ai.py
index d0322c58..0ca1abd4 100644
--- a/tests/test_issue_866_gui_ai.py
+++ b/tests/test_issue_866_gui_ai.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #866 (GUI) : module IA local, équivalent des options --ai-*.
Partie sans GTK : module et pipeline."""
diff --git a/tests/test_issue_866_gui_ai_window.py b/tests/test_issue_866_gui_ai_window.py
index 36c168b7..ebf66c27 100644
--- a/tests/test_issue_866_gui_ai_window.py
+++ b/tests/test_issue_866_gui_ai_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #866 : champs « Module IA local » de la fenetre principale,
validation avant lancement et transmission au thread d'analyse.
diff --git a/tests/test_issue_867_api_plugins.py b/tests/test_issue_867_api_plugins.py
index 7674b72f..cafba28b 100644
--- a/tests/test_issue_867_api_plugins.py
+++ b/tests/test_issue_867_api_plugins.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #867 (API) : plugins côté serveur.
- ``GET /plugins`` : équivalent de ``--list-plugins`` (installés + fichiers de
diff --git a/tests/test_issue_867_gui_plugins.py b/tests/test_issue_867_gui_plugins.py
index faf28e31..4ff53a90 100644
--- a/tests/test_issue_867_gui_plugins.py
+++ b/tests/test_issue_867_gui_plugins.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #867 (GUI) : plugins tiers, équivalent de --plugins / --plugin-path /
--plugin-export / --list-plugins. Partie sans GTK : module et pipeline."""
diff --git a/tests/test_issue_867_gui_plugins_window.py b/tests/test_issue_867_gui_plugins_window.py
index cfe57e63..0f0f0fdc 100644
--- a/tests/test_issue_867_gui_plugins_window.py
+++ b/tests/test_issue_867_gui_plugins_window.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #867 : champs « Plugins » de la fenetre principale, bouton
« Lister », validation avant lancement et transmission au thread d'analyse.
diff --git a/tests/test_issue_868_api_capture_tools.py b/tests/test_issue_868_api_capture_tools.py
index 153a6b3e..b13b630c 100644
--- a/tests/test_issue_868_api_capture_tools.py
+++ b/tests/test_issue_868_api_capture_tools.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issues #868, #869, #870, #886, #887 : manipulation de captures dans
l'API (/tools/*), mêmes résultats et mêmes refus que la CLI."""
diff --git a/tests/test_issue_868_gui_capture_tools.py b/tests/test_issue_868_gui_capture_tools.py
index 0c2fd398..7951316a 100644
--- a/tests/test_issue_868_gui_capture_tools.py
+++ b/tests/test_issue_868_gui_capture_tools.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issues #868, #869, #870, #886, #887 : fenêtre « Outils de capture » de
la GUI, mêmes fichiers et mêmes refus que la CLI."""
diff --git a/tests/test_issue_871_replay.py b/tests/test_issue_871_replay.py
index f39fbfdd..d0893002 100644
--- a/tests/test_issue_871_replay.py
+++ b/tests/test_issue_871_replay.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #871 : rejeu d'une capture depuis la GUI (onglet « Rejeu »,
interruptible, confirmation obligatoire) et l'API (``POST /tools/replay``,
interfaces autorisées par l'administrateur seulement)."""
diff --git a/tests/test_issue_872_api_batches.py b/tests/test_issue_872_api_batches.py
index ece51c82..7463a144 100644
--- a/tests/test_issue_872_api_batches.py
+++ b/tests/test_issue_872_api_batches.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #872 (API) : lots de captures, équivalent de ``cross_capture_batch_cli.py``.
``POST /batches`` (captures ou archive ZIP) puis ``GET /batches/{id}``,
diff --git a/tests/test_issue_872_gui_batch.py b/tests/test_issue_872_gui_batch.py
index 7b147ea1..e4ef0931 100644
--- a/tests/test_issue_872_gui_batch.py
+++ b/tests/test_issue_872_gui_batch.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #872 (GUI) : fenêtre « Analyse d'un dossier », équivalent de
``cross_capture_batch_cli.py``. Même moteur (``batch_runner``) que la CLI :
mêmes groupes, mêmes rapports, mêmes refus."""
diff --git a/tests/test_issue_873_api_lua_doc.py b/tests/test_issue_873_api_lua_doc.py
index c715304a..039566f9 100644
--- a/tests/test_issue_873_api_lua_doc.py
+++ b/tests/test_issue_873_api_lua_doc.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #873 : documentation Lua dans l'API, mêmes documents JSON que
``netcross-lua-doc --json``."""
diff --git a/tests/test_issue_873_gui_lua_doc.py b/tests/test_issue_873_gui_lua_doc.py
index ca9e2978..96f80407 100644
--- a/tests/test_issue_873_gui_lua_doc.py
+++ b/tests/test_issue_873_gui_lua_doc.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #873 : fenêtre « Documentation Lua » de la GUI, même texte et même
JSON que ``netcross-lua-doc``."""
diff --git a/tests/test_issue_874_history.py b/tests/test_issue_874_history.py
index c12b1789..d035f591 100644
--- a/tests/test_issue_874_history.py
+++ b/tests/test_issue_874_history.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #874 : historique des comparaisons et consultation filtrée en GUI
et en API (équivalents de ``--history-db``/``--history-label`` de
``cross_capture_diff_cli.py`` et de ``netcross-history``)."""
diff --git a/tests/test_issue_875_api_notifications.py b/tests/test_issue_875_api_notifications.py
index 62191f20..b023a46b 100644
--- a/tests/test_issue_875_api_notifications.py
+++ b/tests/test_issue_875_api_notifications.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #875 : notifications de l'API (notify_on, notify_webhook,
notify_slack, notify_email, notify_detail), mêmes règles que la CLI et la
GUI, URL jamais conservées dans les métadonnées."""
diff --git a/tests/test_issue_876_api_redact_map.py b/tests/test_issue_876_api_redact_map.py
index 6c58627e..fa9c5e2f 100644
--- a/tests/test_issue_876_api_redact_map.py
+++ b/tests/test_issue_876_api_redact_map.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #876 : table d'anonymisation (--redact-map) dans l'API, et
anonymisation partagée baseline/courant des comparaisons."""
diff --git a/tests/test_issue_876_gui_redact_map.py b/tests/test_issue_876_gui_redact_map.py
index 37761a60..44950542 100644
--- a/tests/test_issue_876_gui_redact_map.py
+++ b/tests/test_issue_876_gui_redact_map.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #876 : table d'anonymisation (--redact-map) dans la GUI, en
analyse simple et en comparaison, même fichier que la CLI."""
diff --git a/tests/test_issue_877_api_support_ticket.py b/tests/test_issue_877_api_support_ticket.py
index 3338d0be..d092124f 100644
--- a/tests/test_issue_877_api_support_ticket.py
+++ b/tests/test_issue_877_api_support_ticket.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #877 (API) : portées, marqueurs et table de correspondance du ticket
de support sur ``POST /analyses/{analysis_id}/support-ticket``.
diff --git a/tests/test_issue_877_gui_support_ticket.py b/tests/test_issue_877_gui_support_ticket.py
index 13301bea..cf6d00bc 100644
--- a/tests/test_issue_877_gui_support_ticket.py
+++ b/tests/test_issue_877_gui_support_ticket.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #877 (GUI) : portées, marqueurs et correspondance privée du ticket
de support, mêmes règles et même fichier que la CLI."""
diff --git a/tests/test_issue_890_history_analyses.py b/tests/test_issue_890_history_analyses.py
index 5997e6c8..551ab215 100644
--- a/tests/test_issue_890_history_analyses.py
+++ b/tests/test_issue_890_history_analyses.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #890 : POST /captures et /captures/multi écrivent dans l'historique
(history, history_label), comme --history-db / --history-label de la CLI."""
diff --git a/tests/test_issue_902_api_live.py b/tests/test_issue_902_api_live.py
index 78964a58..c9198685 100644
--- a/tests/test_issue_902_api_live.py
+++ b/tests/test_issue_902_api_live.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #902 : POST /live-captures, GET /live-captures/{id},
POST /live-captures/{id}/stop -- capture en direct puis analyse.
diff --git a/tests/test_issue_904_live_stop_cancel.py b/tests/test_issue_904_live_stop_cancel.py
index c67fdf44..4e6ba38e 100644
--- a/tests/test_issue_904_live_stop_cancel.py
+++ b/tests/test_issue_904_live_stop_cancel.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# ruff: noqa: F811 -- fixtures pytest importées de test_issue_902_api_live
"""Issue #904 : POST /live-captures/{id}/stop renvoie l'analysis_id ;
DELETE /live-captures/{id} abandonne sans analyser. Issue #903 : la borne
diff --git a/tests/test_issue_905_live_ring_buffer.py b/tests/test_issue_905_live_ring_buffer.py
index 5f13b596..5eaf548f 100644
--- a/tests/test_issue_905_live_ring_buffer.py
+++ b/tests/test_issue_905_live_ring_buffer.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# ruff: noqa: F811 -- fixtures pytest importées de test_issue_902_api_live
"""Issue #905 : ring_buffer de POST /live-captures (équiv. --ring-buffer N:SECONDES),
liste, téléchargement et suppression des fichiers conservés."""
diff --git a/tests/test_issue_906_api_bpf_library.py b/tests/test_issue_906_api_bpf_library.py
index 1a746bcc..2a2855ac 100644
--- a/tests/test_issue_906_api_bpf_library.py
+++ b/tests/test_issue_906_api_bpf_library.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #906 : bibliothèque de filtres BPF dans l'API, même fichier et
mêmes règles que ``--bpf-library`` (CLI) et le panneau BPF de la GUI."""
diff --git a/tests/test_issue_907_live_report_api.py b/tests/test_issue_907_live_report_api.py
index a5d4d532..6b3713a7 100644
--- a/tests/test_issue_907_live_report_api.py
+++ b/tests/test_issue_907_live_report_api.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# ruff: noqa: F811 -- fixtures pytest importées de test_issue_902_api_live
"""Issue #907 : live_report de POST /live-captures (équiv. --live-report,
--live-report-interval), GET /live-captures/{id}/report et URL de consultation
diff --git a/tests/test_issue_908_live_current.py b/tests/test_issue_908_live_current.py
index df62f1a4..a020bbf7 100644
--- a/tests/test_issue_908_live_current.py
+++ b/tests/test_issue_908_live_current.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# ruff: noqa: F811 -- fixtures pytest importées de test_issue_902_api_live
"""Issue #908 : POST /comparisons avec current_live (équiv. --live-current) :
le baseline en fichiers, le courant capturé en direct sur le serveur."""
diff --git a/tests/test_issue_909_comm_map.py b/tests/test_issue_909_comm_map.py
index 6e64283a..b513d37e 100644
--- a/tests/test_issue_909_comm_map.py
+++ b/tests/test_issue_909_comm_map.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #909 : cartographie des communications en CLI (--comm-map) et dans
l'API (GET /analyses/{analysis_id}/comm-map), exports JSON et DOT."""
diff --git a/tests/test_issue_910_annotations.py b/tests/test_issue_910_annotations.py
index 31ad6739..22804c94 100644
--- a/tests/test_issue_910_annotations.py
+++ b/tests/test_issue_910_annotations.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #910 : annotations et signets en CLI (`netcross annotations`, même
sidecar que la GUI), dans le rapport texte et dans l'API
(`/analyses/{analysis_id}/annotations`)."""
diff --git a/tests/test_issue_911_dashboard.py b/tests/test_issue_911_dashboard.py
index d97bbc12..fd127b8f 100644
--- a/tests/test_issue_911_dashboard.py
+++ b/tests/test_issue_911_dashboard.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #911 : dashboard en CLI (--dashboard) et dans l'API
(GET /analyses/{analysis_id}/dashboard), même calcul que la GUI."""
diff --git a/tests/test_issue_912_stats.py b/tests/test_issue_912_stats.py
index 238f8044..51daaeb5 100644
--- a/tests/test_issue_912_stats.py
+++ b/tests/test_issue_912_stats.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #912 : exploration statistique en CLI (--stats) et dans l'API
(GET /analyses/{analysis_id}/stats), même calcul que la vue GUI."""
diff --git a/tests/test_issue_917_lua_dissectors.py b/tests/test_issue_917_lua_dissectors.py
index a2e1f45a..a5cc6794 100644
--- a/tests/test_issue_917_lua_dissectors.py
+++ b/tests/test_issue_917_lua_dissectors.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
# ruff: noqa: E501 -- CSV de test sur une ligne par dissecteur
"""Issue #917 : catalogue des dissecteurs Lua (recensement wireshark-lua) dans
la banque Lua -- même texte et même JSON en CLI, API et GUI."""
diff --git a/tests/test_journalisation_dissection.py b/tests/test_journalisation_dissection.py
index e7b30222..b282e25a 100644
--- a/tests/test_journalisation_dissection.py
+++ b/tests/test_journalisation_dissection.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#441, lot 2 : la dissection par paquet ne trace les cas particuliers
qu'au niveau TRACE, et les calculs par flux au niveau DEBUG.
diff --git a/tests/test_journalisation_forensic.py b/tests/test_journalisation_forensic.py
index 37539a62..2f8fc381 100644
--- a/tests/test_journalisation_forensic.py
+++ b/tests/test_journalisation_forensic.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#441, lot 3 : journalisation de netcross_core.forensic et forensic_search."""
from __future__ import annotations
diff --git a/tests/test_journalisation_lot8.py b/tests/test_journalisation_lot8.py
index 6759ab4d..c26c0755 100644
--- a/tests/test_journalisation_lot8.py
+++ b/tests/test_journalisation_lot8.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#441, lot 8 : traces d'entrée des points d'analyse une fois par capture."""
from __future__ import annotations
diff --git a/tests/test_journalisation_rapport.py b/tests/test_journalisation_rapport.py
index 0af8f99e..a3224628 100644
--- a/tests/test_journalisation_rapport.py
+++ b/tests/test_journalisation_rapport.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#441, lot 7 : journalisation de netcross_report (moteur de règles, rapport sécurité)."""
from __future__ import annotations
diff --git a/tests/test_journalisation_signatures.py b/tests/test_journalisation_signatures.py
index a9775aa8..7bbd98e9 100644
--- a/tests/test_journalisation_signatures.py
+++ b/tests/test_journalisation_signatures.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#441, lot 6 : journalisation de exploit_signatures et application/banners."""
from __future__ import annotations
diff --git a/tests/test_journalisation_tls_quic.py b/tests/test_journalisation_tls_quic.py
index 2888d178..72eba489 100644
--- a/tests/test_journalisation_tls_quic.py
+++ b/tests/test_journalisation_tls_quic.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#441, lot 5 : journalisation de tls_diagnostics et quic_diagnostics."""
from __future__ import annotations
diff --git a/tests/test_json_report.py b/tests/test_json_report.py
index 04a3fef2..98b724e5 100644
--- a/tests/test_json_report.py
+++ b/tests/test_json_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.json_report -- verifie que le JSON produit est valide,
structurellement complet, et coherent avec le meme calcul de findings/
diff --git a/tests/test_lateral_movement.py b/tests/test_lateral_movement.py
index 11fb82cc..de058111 100644
--- a/tests/test_lateral_movement.py
+++ b/tests/test_lateral_movement.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.lateral_movement -- tests (issue #149, SCENARIO-3).
diff --git a/tests/test_lateral_movement_couverture.py b/tests/test_lateral_movement_couverture.py
index a6cfaac2..fcb0d143 100644
--- a/tests/test_lateral_movement_couverture.py
+++ b/tests/test_lateral_movement_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.lateral_movement -- couverture des chemins limites
(issue #715, suite de #665).
diff --git a/tests/test_link_speed.py b/tests/test_link_speed.py
index 3e525e48..35f87323 100644
--- a/tests/test_link_speed.py
+++ b/tests/test_link_speed.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #1132 : vitesse d'interface (if_speed) et resolution d'horodatage
(if_tsresol) par interface pcapng, repli --link-speed POINT=VITESSE."""
diff --git a/tests/test_live_capture_points.py b/tests/test_live_capture_points.py
index 2c1384f4..3bfd83c2 100644
--- a/tests/test_live_capture_points.py
+++ b/tests/test_live_capture_points.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_gtk4.live_capture_points -- eclatement d'une ligne du panneau de
capture live en un point par interface (Job 48, issue #168).
diff --git a/tests/test_live_diff.py b/tests/test_live_diff.py
index 8eefb5c2..8d2aaa12 100644
--- a/tests/test_live_diff.py
+++ b/tests/test_live_diff.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""tests/test_live_diff.py — Capture en continu + diff en direct (Job 33, issue #33).
Tests du module netcross_core.live_diff : conversion DiffFinding -> AlarmSignal,
diff --git a/tests/test_live_report.py b/tests/test_live_report.py
index 868f78a3..6e032382 100644
--- a/tests/test_live_report.py
+++ b/tests/test_live_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #274 : rapport temps reel du mode --live (dictionnaire structure,
instantane + journal, page a relecture successive ou completive)."""
diff --git a/tests/test_live_report_couverture.py b/tests/test_live_report_couverture.py
index 939c2a76..7ebbe5b3 100644
--- a/tests/test_live_report_couverture.py
+++ b/tests/test_live_report_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""tests/test_live_report_couverture.py -- couverture >= 98 % de netcross_core/live_report.py (issue #732).
Complete tests/test_live_report.py sur ce qu'il ne prenait pas : chemin
diff --git a/tests/test_logging_config.py b/tests/test_logging_config.py
index 15e4c987..54737b1d 100644
--- a/tests/test_logging_config.py
+++ b/tests/test_logging_config.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests du mode debug de netcross_core.logging_config (issue #245 : « activer
le tracing en mode debug pour suivre efficacement l'exécution »).
diff --git a/tests/test_logging_config_inprocess.py b/tests/test_logging_config_inprocess.py
index b2f09a65..87957241 100644
--- a/tests/test_logging_config_inprocess.py
+++ b/tests/test_logging_config_inprocess.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests en processus de netcross_core.logging_config (#681).
`tests/test_logging_config.py` verifie le comportement de bout en bout dans
diff --git a/tests/test_loguru_formatting.py b/tests/test_loguru_formatting.py
index ebd16e53..266a11ec 100644
--- a/tests/test_loguru_formatting.py
+++ b/tests/test_loguru_formatting.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Test de lint AST (issue #390) : interdit les appels logger.* dont le message
contient des accolades de format sans arguments correspondants, et les
diff --git a/tests/test_loguru_regles.py b/tests/test_loguru_regles.py
index aaf28f29..032c1328 100644
--- a/tests/test_loguru_regles.py
+++ b/tests/test_loguru_regles.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Regles loguru de l'issue #245, verifiees sur tout ``src/``
(issue #954 : ``scripts/`` et ``tools/`` inclus) :
diff --git a/tests/test_lua_api_extraction.py b/tests/test_lua_api_extraction.py
index 8afb880f..abe9f279 100644
--- a/tests/test_lua_api_extraction.py
+++ b/tests/test_lua_api_extraction.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de l'extraction de l'API Lua Wireshark depuis l'AsciiDoc de make-wsluarm.py (issue #386)."""
from __future__ import annotations
diff --git a/tests/test_lua_doc_cli.py b/tests/test_lua_doc_cli.py
index a69baad2..225644e0 100644
--- a/tests/test_lua_doc_cli.py
+++ b/tests/test_lua_doc_cli.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de la CLI netcross-lua-doc (issue #388) et de lua_doc.ensure_db."""
from __future__ import annotations
diff --git a/tests/test_lua_doc_db.py b/tests/test_lua_doc_db.py
index f8dbbf5f..ae0b6c7a 100644
--- a/tests/test_lua_doc_db.py
+++ b/tests/test_lua_doc_db.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de la banque SQLite de l'API Lua Wireshark (issue #387)."""
from __future__ import annotations
diff --git a/tests/test_markdown_report.py b/tests/test_markdown_report.py
index 41307890..cfead745 100644
--- a/tests/test_markdown_report.py
+++ b/tests/test_markdown_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.markdown_report -- vérifie que le rapport Markdown produit
est structurellement correct et cohérent avec les autres formats (PDF,
diff --git a/tests/test_markdown_report_sections.py b/tests/test_markdown_report_sections.py
index 9b13d7ee..d4065bfa 100644
--- a/tests/test_markdown_report_sections.py
+++ b/tests/test_markdown_report_sections.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""netcross_report.markdown_report -- sections sécurité, expertise et
optionnelles du rapport Markdown (suite #665 et #761).
diff --git a/tests/test_memory_warning.py b/tests/test_memory_warning.py
index 4a9c4eff..e790b57e 100644
--- a/tests/test_memory_warning.py
+++ b/tests/test_memory_warning.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de l'estimation memoire et de l'avertissement avant analyse (issue
#283, Etape 2), et de --max-packets/--sample (Etape 3).
diff --git a/tests/test_merge_captures.py b/tests/test_merge_captures.py
index fcf7e562..46add9b4 100644
--- a/tests/test_merge_captures.py
+++ b/tests/test_merge_captures.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Fusion de captures (Job 34, issue #154) : pcap_parser.capture.merge_captures
et le flag --merge de cross_capture_analyzer_cli.py.
diff --git a/tests/test_metric_chart.py b/tests/test_metric_chart.py
index 45a01442..aecc670d 100644
--- a/tests/test_metric_chart.py
+++ b/tests/test_metric_chart.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_metric_chart -- tests du generateur de graphes generique
(Job 20, §6.18). Les tests ne verifient pas les pixels : ils
diff --git a/tests/test_metrics_export.py b/tests/test_metrics_export.py
index dffb6751..ce44eafa 100644
--- a/tests/test_metrics_export.py
+++ b/tests/test_metrics_export.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Catalogue des metriques Prometheus et cardinalite bornee (issue #1110)."""
from __future__ import annotations
diff --git a/tests/test_naming.py b/tests/test_naming.py
index daf05f98..0a61aad2 100644
--- a/tests/test_naming.py
+++ b/tests/test_naming.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.naming -- tests de la table des noms (Job 18 / issue #17,
section 6.15) et de son integration dans les sorties CSV detail et JSON.
diff --git a/tests/test_netflow_cli.py b/tests/test_netflow_cli.py
index ef1783f0..0df01e58 100644
--- a/tests/test_netflow_cli.py
+++ b/tests/test_netflow_cli.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #362 : ingestion NetFlow accessible depuis le CLI, avec sortie JSON."""
from __future__ import annotations
diff --git a/tests/test_netflow_v5.py b/tests/test_netflow_v5.py
index bfd07fc6..7ec86713 100644
--- a/tests/test_netflow_v5.py
+++ b/tests/test_netflow_v5.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
tests/test_netflow_v5.py -- tests du parseur NetFlow v5 et de
l'adaptateur FlowRecord -> Pkt (Job 32/issue #32, Phases 1-2 de
diff --git a/tests/test_notify.py b/tests/test_notify.py
index d7cd4175..775f9a44 100644
--- a/tests/test_notify.py
+++ b/tests/test_notify.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Notifications sortantes sur seuil de gravite (issue #280).
diff --git a/tests/test_notify_dispatch.py b/tests/test_notify_dispatch.py
index 08ef9492..d7b81f51 100644
--- a/tests/test_notify_dispatch.py
+++ b/tests/test_notify_dispatch.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.notify.dispatch -- chemins d'erreur et cas limites (issue #720,
suite de #665).
diff --git a/tests/test_notify_transports.py b/tests/test_notify_transports.py
index 6a06737a..4146ab2f 100644
--- a/tests/test_notify_transports.py
+++ b/tests/test_notify_transports.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests complementaires de netcross_core.notify.transports (#682).
`tests/test_notify.py` couvre les chemins nominaux (serveur HTTP local,
diff --git a/tests/test_off_path_vs_loss.py b/tests/test_off_path_vs_loss.py
index 7706b4b7..d9d6f9a3 100644
--- a/tests/test_off_path_vs_loss.py
+++ b/tests/test_off_path_vs_loss.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #352 : distinguer trafic hors chemin et pertes dans l'analyse croisee.
Scenario de l'issue, en miniature : trois points LAN -> WAN -> DC (ordre
diff --git a/tests/test_openapi_spec.py b/tests/test_openapi_spec.py
index 222aab5f..f829b5fb 100644
--- a/tests/test_openapi_spec.py
+++ b/tests/test_openapi_spec.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de la generation et du controle de fraicheur de docs/openapi.yaml
(issue #209, dernieres cases : script + verification en CI).
diff --git a/tests/test_packet.py b/tests/test_packet.py
index b81eb544..49df0b5b 100644
--- a/tests/test_packet.py
+++ b/tests/test_packet.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.packet.build_packet -- assemble un RawPacket a partir des
couches EK d'un paquet. On construit ici des dicts "layers" synthetiques
diff --git a/tests/test_panel_state.py b/tests/test_panel_state.py
index 3eca073d..0a1fde9c 100644
--- a/tests/test_panel_state.py
+++ b/tests/test_panel_state.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des decisions de panneaux de la GUI (`netcross_gtk4/panel_state.py`).
diff --git a/tests/test_parite_surfaces.py b/tests/test_parite_surfaces.py
index 6742fd18..d7646489 100644
--- a/tests/test_parite_surfaces.py
+++ b/tests/test_parite_surfaces.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #330 : la matrice de parité GUI / CLI / API reste fidèle au code.
``docs/parite-surfaces.md`` répond à la question « toutes les fonctions sont-
diff --git a/tests/test_parse_utils.py b/tests/test_parse_utils.py
index c19be60a..cb1910d7 100644
--- a/tests/test_parse_utils.py
+++ b/tests/test_parse_utils.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.parse_utils -- tests des cas limites non couverts
par les tests de parsers (issue #246).
diff --git a/tests/test_parsing_adapter.py b/tests/test_parsing_adapter.py
index 293a020b..6fd8da9a 100644
--- a/tests/test_parsing_adapter.py
+++ b/tests/test_parsing_adapter.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.parsing -- adaptateur fin entre pcap_parser et le modele
Pkt de netcross_core. Ne refait aucun decodage lui-meme : on verifie
diff --git a/tests/test_path_metrics.py b/tests/test_path_metrics.py
index 0fd6fa24..84cd64ba 100644
--- a/tests/test_path_metrics.py
+++ b/tests/test_path_metrics.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de netcross_report.path_metrics et de la section PDF
"Chemin observe" (Job 16/issue #12).
diff --git a/tests/test_pcap_parser_loguru.py b/tests/test_pcap_parser_loguru.py
index 7c7d16ca..868ad107 100644
--- a/tests/test_pcap_parser_loguru.py
+++ b/tests/test_pcap_parser_loguru.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de non-régression de l'issue #446 : `pcap_parser` utilisé seul
n'écrit rien sur stderr (handler loguru par défaut), et les points
diff --git a/tests/test_pcap_parser_public_api.py b/tests/test_pcap_parser_public_api.py
index e725da4a..bddfc6d6 100644
--- a/tests/test_pcap_parser_public_api.py
+++ b/tests/test_pcap_parser_public_api.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Coherence de l'API publique de pcap_parser (`__all__` vs imports reels).
Regression : apres la fusion defectueuse f1f67dc (PR #190), `__all__` listait
diff --git a/tests/test_pcap_reels.py b/tests/test_pcap_reels.py
index d4ecc5dc..28d92d79 100644
--- a/tests/test_pcap_reels.py
+++ b/tests/test_pcap_reels.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests du harnais de tests réels scripts/pcap_reels.py (issue #1008).
La vraie banque (/app/pcaps) n'existe que sur la VM du runner : ici, une
diff --git a/tests/test_pcapng_comments.py b/tests/test_pcapng_comments.py
index 4eab679b..1aa8c727 100644
--- a/tests/test_pcapng_comments.py
+++ b/tests/test_pcapng_comments.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Commentaires pcapng (Job 39, issue #159) -- paquets ET section.
diff --git a/tests/test_pdf_report.py b/tests/test_pdf_report.py
index 0efd4d8f..8cde2a71 100644
--- a/tests/test_pdf_report.py
+++ b/tests/test_pdf_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests du rendu PDF (`netcross_report/pdf.py`) -- issue #286.
diff --git a/tests/test_pipeline_optional_branches.py b/tests/test_pipeline_optional_branches.py
index 6d1dbb8e..11dddfd7 100644
--- a/tests/test_pipeline_optional_branches.py
+++ b/tests/test_pipeline_optional_branches.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests pour les branches optionnelles des pipelines (#246).
Couvre les chemins rarement exécutés :
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 74cb7e0f..35578467 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Systeme de plugins (issue #284).
diff --git a/tests/test_plugins_loader_coverage.py b/tests/test_plugins_loader_coverage.py
index 322c41aa..a8c47bee 100644
--- a/tests/test_plugins_loader_coverage.py
+++ b/tests/test_plugins_loader_coverage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #699 (suite de #665) : branches restantes de ``netcross_core.plugins.loader``.
Complete ``tests/test_plugins.py`` : sources non lisibles ou non Python,
diff --git a/tests/test_pr_coverage_comment.py b/tests/test_pr_coverage_comment.py
index baf2923a..aa8923c0 100644
--- a/tests/test_pr_coverage_comment.py
+++ b/tests/test_pr_coverage_comment.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de scripts/pr_coverage_comment.py (couverture incrementale par PR).
Le script publie un commentaire sur la PR via l'API GitHub -- reseaux
diff --git a/tests/test_premier_demarrage.py b/tests/test_premier_demarrage.py
index 6c17c77c..ddae314c 100644
--- a/tests/test_premier_demarrage.py
+++ b/tests/test_premier_demarrage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""#468 -- premier demarrage : ressources locales absentes et captures
illisibles ne doivent ni produire de traces ERROR trompeuses, ni un message
brut de tshark sans piste de correction."""
diff --git a/tests/test_probe_api_spec.py b/tests/test_probe_api_spec.py
index 28c1cae1..b03402ea 100644
--- a/tests/test_probe_api_spec.py
+++ b/tests/test_probe_api_spec.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Validation du contrat agent netcross-probe <-> collecteur (issue #1098).
- le schema docs/probe-api-v1.yaml est un document OpenAPI 3.1 valide
diff --git a/tests/test_profiling.py b/tests/test_profiling.py
index b5494746..97b62493 100644
--- a/tests/test_profiling.py
+++ b/tests/test_profiling.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Mesures par étape du pipeline (issue #1016)."""
from __future__ import annotations
diff --git a/tests/test_protocol_mismatch.py b/tests/test_protocol_mismatch.py
index a94efe30..3dd1e2a4 100644
--- a/tests/test_protocol_mismatch.py
+++ b/tests/test_protocol_mismatch.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de netcross_core.security.protocol_mismatch (issue #142, FLOW-1).
diff --git a/tests/test_protocols.py b/tests/test_protocols.py
index 926a0d62..24bbab5d 100644
--- a/tests/test_protocols.py
+++ b/tests/test_protocols.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.protocols -- lit d'abord ce que tshark a nativement
dissecte (RTP/DHCP/SIP), retombe sur une heuristique par octets sinon.
diff --git a/tests/test_pseudonyms.py b/tests/test_pseudonyms.py
index 81c0cb29..1c55126d 100644
--- a/tests/test_pseudonyms.py
+++ b/tests/test_pseudonyms.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #1151 : module commun de pseudonymisation (adresses + noms)."""
from __future__ import annotations
diff --git a/tests/test_quic_diagnostics.py b/tests/test_quic_diagnostics.py
index 034642d6..788daa3e 100644
--- a/tests/test_quic_diagnostics.py
+++ b/tests/test_quic_diagnostics.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.quic_diagnostics -- derivation de cles QUIC v1 validee
contre les vecteurs de test OFFICIELS de la RFC 9001 Annexe A.2/A.3 (pas
diff --git a/tests/test_quic_import_error.py b/tests/test_quic_import_error.py
index 13fd1fec..745e2a25 100644
--- a/tests/test_quic_import_error.py
+++ b/tests/test_quic_import_error.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Test du repli ImportError de quic_diagnostics (lines 55-62).
Le module quic_diagnostics importe cryptography au niveau module. Si
diff --git a/tests/test_quic_v2.py b/tests/test_quic_v2.py
index 84a29323..5b5f17b4 100644
--- a/tests/test_quic_v2.py
+++ b/tests/test_quic_v2.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de la reconnaissance de QUIC v2 (RFC 9369) -- issue #1061.
Les vecteurs (secrets, cles, en-tetes, paquet protege complet) sont
diff --git a/tests/test_radio.py b/tests/test_radio.py
index 739d33c5..60841b42 100644
--- a/tests/test_radio.py
+++ b/tests/test_radio.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #1142 : capture 802.11 radiotap comme point de capture, lecture
par trame du RSSI, du MCS, du debit, du retry et du canal."""
diff --git a/tests/test_redact.py b/tests/test_redact.py
index 6f6228e5..214fd0ef 100644
--- a/tests/test_redact.py
+++ b/tests/test_redact.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.redact -- anonymisation des adresses IP/MAC (--redact).
diff --git a/tests/test_redact_couverture.py b/tests/test_redact_couverture.py
index e5caa08b..9a3bb697 100644
--- a/tests/test_redact_couverture.py
+++ b/tests/test_redact_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.redact -- champs presents mais NON redigeables (issue #735,
suite de #665).
diff --git a/tests/test_remote_capture.py b/tests/test_remote_capture.py
index 1d384b35..b94b21b7 100644
--- a/tests/test_remote_capture.py
+++ b/tests/test_remote_capture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Sources de capture distantes (issue #166) : rpcap://, sshdump:// (ssh://),
pipe:// -- analyse des URL, arguments tshark (subprocess simule), CLI et GUI.
tshark n'est jamais lance : subprocess.Popen est remplace."""
diff --git a/tests/test_replay.py b/tests/test_replay.py
index a26539a4..a920ca6c 100644
--- a/tests/test_replay.py
+++ b/tests/test_replay.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capture.replay_capture (Job 44, issue #164) -- rejeu de
trafic controle via tcpreplay. Meme discipline que pour merge_captures
diff --git a/tests/test_report_init_import_error.py b/tests/test_report_init_import_error.py
index 828d7369..9d319511 100644
--- a/tests/test_report_init_import_error.py
+++ b/tests/test_report_init_import_error.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Test du repli ImportError de netcross_report/__init__.py (lignes 85-88, #680).
netcross_report importe netcross_report.pdf (reportlab/matplotlib/networkx)
diff --git a/tests/test_report_text.py b/tests/test_report_text.py
index 45357128..45967845 100644
--- a/tests/test_report_text.py
+++ b/tests/test_report_text.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.report_text -- mise en forme texte/CSV d'un Report. On ne
teste pas la mise en page caractere pres (fragile, sans valeur), mais
diff --git a/tests/test_report_writer.py b/tests/test_report_writer.py
index e5fc9bc0..4916d963 100644
--- a/tests/test_report_writer.py
+++ b/tests/test_report_writer.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #695 (suite de #665) : branches restantes de ``netcross_ai.report_writer``.
Complete ``tests/test_ai_module.py`` (qui couvre le chemin nominal) avec les
diff --git a/tests/test_ring_inventory.py b/tests/test_ring_inventory.py
index 5984cac6..0e46f508 100644
--- a/tests/test_ring_inventory.py
+++ b/tests/test_ring_inventory.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Inventaire horodate du tampon circulaire et selection par fenetre (issue #1086)."""
from __future__ import annotations
diff --git a/tests/test_row_labels.py b/tests/test_row_labels.py
index ef707de9..52339cca 100644
--- a/tests/test_row_labels.py
+++ b/tests/test_row_labels.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests des libelles de lignes de la GUI (`netcross_gtk4/row_labels.py`).
diff --git a/tests/test_rule_engine.py b/tests/test_rule_engine.py
index f2f36dac..5d4a55e7 100644
--- a/tests/test_rule_engine.py
+++ b/tests/test_rule_engine.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.rule_engine -- premier pilote du moteur d'execution
(voir docstring de module, CLAUDE.md section "Prochaine feature").
diff --git a/tests/test_run_outcome.py b/tests/test_run_outcome.py
index 1c5ed2d7..af12a469 100644
--- a/tests/test_run_outcome.py
+++ b/tests/test_run_outcome.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de l'etat de resultat de la GUI (`netcross_gtk4/run_outcome.py`).
diff --git a/tests/test_security_findings.py b/tests/test_security_findings.py
index 7d54ac57..b9e72801 100644
--- a/tests/test_security_findings.py
+++ b/tests/test_security_findings.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.findings -- alimentation du rapport de securite
(CVE-5, issue #139) a partir des modules CVE-1 a CVE-4, et cablage
diff --git a/tests/test_security_outputs.py b/tests/test_security_outputs.py
index 06aceb46..2e65fd3f 100644
--- a/tests/test_security_outputs.py
+++ b/tests/test_security_outputs.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Issue #218 -- les constats de securite doivent atteindre les sorties
machine (JSON), le document partage (PDF) et le rendu consultable (HTML),
diff --git a/tests/test_security_report.py b/tests/test_security_report.py
index e7899774..e399743c 100644
--- a/tests/test_security_report.py
+++ b/tests/test_security_report.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.security_report -- tests du rapport de securite
consolide et du tableau de bord (CVE-5, issue #139).
diff --git a/tests/test_security_report_pcap.py b/tests/test_security_report_pcap.py
index a394d05a..9fd06682 100644
--- a/tests/test_security_report_pcap.py
+++ b/tests/test_security_report_pcap.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Rapport de securite (CVE-5, issue #139) sur de VRAIS fichiers pcap decodes
par tshark : le critere d'acceptation « aucun faux positif sur trafic normal
diff --git a/tests/test_security_report_valeurs_absentes.py b/tests/test_security_report_valeurs_absentes.py
index 243c170c..81de9aba 100644
--- a/tests/test_security_report_valeurs_absentes.py
+++ b/tests/test_security_report_valeurs_absentes.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""_opt_int / _opt_float : une valeur absente n'est pas une erreur (pas de
trace ERROR dans le journal à chaque rapport de sécurité)."""
diff --git a/tests/test_sequence_gaps.py b/tests/test_sequence_gaps.py
index 014c8d38..bc4df50e 100644
--- a/tests/test_sequence_gaps.py
+++ b/tests/test_sequence_gaps.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Job 42 (issue #162) -- detection des trous de sequence TCP.
diff --git a/tests/test_sequence_view.py b/tests/test_sequence_view.py
index 34a3ec94..d584b3dd 100644
--- a/tests/test_sequence_view.py
+++ b/tests/test_sequence_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de netcross_report.sequence_view, du diagramme matplotlib et de la
section PDF "Sequence des echanges" (Job 14/issue #11).
diff --git a/tests/test_session_objects.py b/tests/test_session_objects.py
index 2ec513a1..b9343772 100644
--- a/tests/test_session_objects.py
+++ b/tests/test_session_objects.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.session_objects -- extraction du bloc de construction des
objets enrichis (Job 4/issue #13) et rendu console/PDF.
diff --git a/tests/test_session_objects_couverture.py b/tests/test_session_objects_couverture.py
index 3ad4a8dc..95c7cb02 100644
--- a/tests/test_session_objects_couverture.py
+++ b/tests/test_session_objects_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""tests/test_session_objects_couverture.py -- couverture >= 98 % de netcross_report/session_objects.py (issue #731).
Complete tests/test_session_objects.py sur les branches du rendu console et de
diff --git a/tests/test_siem_cef_golden.py b/tests/test_siem_cef_golden.py
index 4d12fdde..942b5eed 100644
--- a/tests/test_siem_cef_golden.py
+++ b/tests/test_siem_cef_golden.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Non-regression du CEF apres le refactoring `_to_siem_records` (issue #279) :
sortie figee capturee AVANT le refactoring, horloge figee.
diff --git a/tests/test_siem_export.py b/tests/test_siem_export.py
index ea063323..ef9f5960 100644
--- a/tests/test_siem_export.py
+++ b/tests/test_siem_export.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.siem_export -- tests (issue #170).
diff --git a/tests/test_split_by_interface.py b/tests/test_split_by_interface.py
index 85d10944..8996c3bb 100644
--- a/tests/test_split_by_interface.py
+++ b/tests/test_split_by_interface.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Plusieurs captures dans un seul fichier pcapng (issue #474) :
pcap_parser.capture.list_interfaces / split_by_interface et l'option
--split-interfaces de cross_capture_analyzer_cli.py.
diff --git a/tests/test_split_capture.py b/tests/test_split_capture.py
index 1c41e1d5..86520a95 100644
--- a/tests/test_split_capture.py
+++ b/tests/test_split_capture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.capture.split_capture -- decoupage par duree / nombre de
paquets (wrapper editcap) et par taille (pcap_parser.capfile) -- Job 35,
diff --git a/tests/test_split_cli.py b/tests/test_split_cli.py
index 0c6cf822..384d1e9b 100644
--- a/tests/test_split_cli.py
+++ b/tests/test_split_cli.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
--split / --split-output-dir de cross_capture_analyzer_cli.py -- Job 35,
issue #155. split_capture est monkeypatche (son comportement reel est
diff --git a/tests/test_split_interfaces_gui.py b/tests/test_split_interfaces_gui.py
index aecb3ccb..7c5eaefd 100644
--- a/tests/test_split_interfaces_gui.py
+++ b/tests/test_split_interfaces_gui.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #474 lot 2 : capture unique et --split-interfaces dans la GUI.
Partie 1 : pipeline (pur Python). Partie 2 : case de MainWindow, ignorée
diff --git a/tests/test_ssh_hassh_erreurs.py b/tests/test_ssh_hassh_erreurs.py
index 778b8781..ec86c668 100644
--- a/tests/test_ssh_hassh_erreurs.py
+++ b/tests/test_ssh_hassh_erreurs.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests des chemins d'erreur de netcross_core.fingerprint.ssh_hassh (#684).
Couvre les sorties None de `_parse_kexinit` (banniere sans fin de ligne,
diff --git a/tests/test_ssh_hassh_non_ssh.py b/tests/test_ssh_hassh_non_ssh.py
index 89ebfab0..2b084d77 100644
--- a/tests/test_ssh_hassh_non_ssh.py
+++ b/tests/test_ssh_hassh_non_ssh.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #760 : SSH HASSH ne doit pas planter sur des donnees non-SSH."""
from netcross_core.fingerprint.ssh_hassh import identify, parse_kexinit
diff --git a/tests/test_stats.py b/tests/test_stats.py
index 8d413079..5defb26f 100644
--- a/tests/test_stats.py
+++ b/tests/test_stats.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""tests/test_stats.py — Exploration statistique interactive (Job 27, issue #22).
Tests du module netcross_core.stats : Top-N, tri, regroupement, filtres
diff --git a/tests/test_stats_view.py b/tests/test_stats_view.py
index e8cc7433..6552d06c 100644
--- a/tests/test_stats_view.py
+++ b/tests/test_stats_view.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""tests/test_stats_view.py -- tests du module netcross_gtk4.stats_view.
Logique de presentation pour la vue d'exploration statistique (Job 27).
diff --git a/tests/test_stix_export_couverture.py b/tests/test_stix_export_couverture.py
index 7396c54e..861b4598 100644
--- a/tests/test_stix_export_couverture.py
+++ b/tests/test_stix_export_couverture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests de couverture de netcross_report/stix_export.py (issue #713, suite #665).
Complète tests/test_stix_leef_export.py par les entrées incomplètes ou
diff --git a/tests/test_stix_leef_export.py b/tests/test_stix_leef_export.py
index 39b2c967..e3a39251 100644
--- a/tests/test_stix_leef_export.py
+++ b/tests/test_stix_leef_export.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Exports LEEF 2.0 et STIX 2.1 (issue #279).
"""
diff --git a/tests/test_support_tickets.py b/tests/test_support_tickets.py
index e08e6556..3397b04e 100644
--- a/tests/test_support_tickets.py
+++ b/tests/test_support_tickets.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Tests de la remontee de tickets anonymisee (issue #269).
diff --git a/tests/test_synth.py b/tests/test_synth.py
index 4eeea1d5..2d7a32a5 100644
--- a/tests/test_synth.py
+++ b/tests/test_synth.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests du générateur de jeux synthétiques multi-points (issue #1015).
La relecture des fichiers passe par ``tests/pcap_builders.read_pcapng``,
diff --git a/tests/test_synthesis.py b/tests/test_synthesis.py
index a7ee2496..f3a62327 100644
--- a/tests/test_synthesis.py
+++ b/tests/test_synthesis.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.synthesis.build_findings -- chaque regle est tracable a
un chiffre du Report ; on construit des Report minimalistes cible par
diff --git a/tests/test_test_net_scope.py b/tests/test_test_net_scope.py
index 9f0c6bc4..f4cac56f 100644
--- a/tests/test_test_net_scope.py
+++ b/tests/test_test_net_scope.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Issue #365 : plages TEST-NET (RFC 5737) internes par defaut, externes sur demande.
Documente le comportement : `ipaddress` range 192.0.2.0/24, 198.51.100.0/24
diff --git a/tests/test_tls_audit.py b/tests/test_tls_audit.py
index c4eee05b..b272246d 100644
--- a/tests/test_tls_audit.py
+++ b/tests/test_tls_audit.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.security.tls_audit -- issue #153 (SCENARIO-7) : audit des
certificats TLS. Paquets synthetiques (make_pkt) portant les champs
diff --git a/tests/test_tls_cert_extraction.py b/tests/test_tls_cert_extraction.py
index 3c23d675..afc09c73 100644
--- a/tests/test_tls_cert_extraction.py
+++ b/tests/test_tls_cert_extraction.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Extraction des details du certificat TLS feuille (issue #153) : emetteur,
sujet, algorithme de signature, cle publique, IP du SAN, longueur de chaine,
diff --git a/tests/test_tls_diagnostics.py b/tests/test_tls_diagnostics.py
index 70e6c3ea..c008a37a 100644
--- a/tests/test_tls_diagnostics.py
+++ b/tests/test_tls_diagnostics.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tls_diagnostics -- parsing bas niveau de messages TLS
construits a la main (memes principes que la validation manuelle
diff --git a/tests/test_tls_keylog.py b/tests/test_tls_keylog.py
index 5104b5d5..d2c850c7 100644
--- a/tests/test_tls_keylog.py
+++ b/tests/test_tls_keylog.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""--tls-keylog (issue #1040) : spécifications, refus, transmission à tshark.
Les tests « réels » utilisent une vraie session TLS 1.3 générée en mémoire
diff --git a/tests/test_tls_keylog_surfaces.py b/tests/test_tls_keylog_surfaces.py
index 897d368b..881deb6f 100644
--- a/tests/test_tls_keylog_surfaces.py
+++ b/tests/test_tls_keylog_surfaces.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""--tls-keylog sur les quatre surfaces (issue #1040) : CLI d'analyse, CLI de
différentiel, API et GUI. Capture TLS 1.3 réelle (tests/tls13_keylog_capture.py)
quand tshark est présent, doubles sinon.
diff --git a/tests/test_triage.py b/tests/test_triage.py
index 90d345cf..fd15dbd5 100644
--- a/tests/test_triage.py
+++ b/tests/test_triage.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_report.triage.rank_segments -- module duck-type, on utilise
des objets minimalistes (namedtuple) exposant juste .severity/.category
diff --git a/tests/test_tshark_stats.py b/tests/test_tshark_stats.py
index 36066198..d959fbd7 100644
--- a/tests/test_tshark_stats.py
+++ b/tests/test_tshark_stats.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats -- tests des adaptateurs de statistiques tshark -z
(Job 19 / issue #20, section 6.19).
diff --git a/tests/test_tshark_stats_io_stat.py b/tests/test_tshark_stats_io_stat.py
index 2c62242a..6bed0723 100644
--- a/tests/test_tshark_stats_io_stat.py
+++ b/tests/test_tshark_stats_io_stat.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.tshark_stats.io_stat -- tests de couverture (issue #710, suite #665).
diff --git a/tests/test_tunnels.py b/tests/test_tunnels.py
index e0f42c10..b60ecf2b 100644
--- a/tests/test_tunnels.py
+++ b/tests/test_tunnels.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
pcap_parser.tunnels -- detection de la pile d'encapsulation et choix de
la couche IP/TCP/UDP/ICMP la plus interne. Le format textuel des tags
diff --git a/tests/test_voip.py b/tests/test_voip.py
index f0f7c84a..87ad80c2 100644
--- a/tests/test_voip.py
+++ b/tests/test_voip.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
import dataclasses
import pytest
diff --git a/tests/test_web_attack_signatures.py b/tests/test_web_attack_signatures.py
index 19c39fa5..a794f08a 100644
--- a/tests/test_web_attack_signatures.py
+++ b/tests/test_web_attack_signatures.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Signatures web courantes (issue #353) : traversees, injections.
Critere de l'issue : la requete `/.%2e/.%2e/etc/passwd` (CVE-2021-41773)
diff --git a/tests/test_wireshark_expert.py b/tests/test_wireshark_expert.py
index 59ad2ddd..e8738d9f 100644
--- a/tests/test_wireshark_expert.py
+++ b/tests/test_wireshark_expert.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
netcross_core.wireshark_expert -- build_wireshark_expert_events() (Session 1,
FEATURES.md section 13.3 : "exploitation de l'expertise Wireshark/TShark").
diff --git a/tests/test_zeek_export.py b/tests/test_zeek_export.py
new file mode 100644
index 00000000..b70bea79
--- /dev/null
+++ b/tests/test_zeek_export.py
@@ -0,0 +1,373 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+"""Tests de l'export Zeek conn.log (issue #1115, chantier #1003).
+
+Relecture facon ``zeek-cut`` : un analyseur TSV qui suit les en-tetes
+``#separator``/``#fields``/``#types`` comme le fait Zeek, et qui verifie que
+chaque ligne a exactement les colonnes annoncees. Puis la variante JSON,
+les etats TCP, les colonnes multi-points et ``--redact``.
+"""
+
+from __future__ import annotations
+
+import json
+import sys
+
+import pytest
+from conftest import make_pkt
+
+import cross_capture_analyzer_cli as cli
+from netcross_core.redact import redact_packets
+from netcross_report import zeek_export as zk
+
+# -- analyseur TSV « zeek-cut » ----------------------------------------------------------------
+
+
+def lire_conn_log(texte: str) -> tuple[dict[str, str], list[str], list[str], list[dict[str, str]]]:
+ """Relit un conn.log TSV comme zeek-cut : en-tetes, #fields, #types, lignes."""
+ lignes = texte.splitlines()
+ assert lignes[0] == "#separator \\x09"
+ sep = "\t"
+ entetes: dict[str, str] = {}
+ fields: list[str] = []
+ types: list[str] = []
+ rows: list[dict[str, str]] = []
+ for ligne in lignes[1:]:
+ if ligne.startswith("#"):
+ cle, _, valeur = ligne[1:].partition(sep)
+ if cle == "fields":
+ fields = valeur.split(sep)
+ elif cle == "types":
+ types = valeur.split(sep)
+ else:
+ entetes[cle] = valeur
+ continue
+ valeurs = ligne.split(sep)
+ assert len(valeurs) == len(fields), f"colonnes : {len(valeurs)} au lieu de {len(fields)}"
+ rows.append(dict(zip(fields, valeurs, strict=True)))
+ return entetes, fields, types, rows
+
+
+def _tcp(point, t0, client="10.0.0.1", serveur="10.0.0.2", fin=True, lag=0.0):
+ c = {"src": client, "dst": serveur, "sport": 50000, "dport": 443, "point": point}
+ s = {"src": serveur, "dst": client, "sport": 443, "dport": 50000, "point": point}
+ pkts = [
+ make_pkt(ts=t0 + lag, flags="SYN", seq=1, length=74, **c),
+ make_pkt(ts=t0 + 0.020 + lag, flags="SYN,ACK", seq=9, ack=2, length=74, **s),
+ make_pkt(ts=t0 + 0.021 + lag, flags="ACK", seq=2, length=66, **c),
+ make_pkt(
+ ts=t0 + 0.030 + lag,
+ flags="PSH,ACK",
+ seq=3,
+ tcp_len=100,
+ payload_hash="p1",
+ length=166,
+ tls_client_hello=True,
+ **c,
+ ),
+ make_pkt(ts=t0 + 0.050 + lag, flags="PSH,ACK", seq=10, tcp_len=400, payload_hash="p2", length=466, **s),
+ ]
+ if fin:
+ pkts += [
+ make_pkt(ts=t0 + 0.060 + lag, flags="FIN,ACK", seq=103, length=66, **c),
+ make_pkt(ts=t0 + 0.070 + lag, flags="FIN,ACK", seq=410, length=66, **s),
+ ]
+ return pkts
+
+
+# -- en-tetes et colonnes ----------------------------------------------------------------------
+
+
+def test_entetes_fields_types_conformes():
+ texte = zk.to_tsv(zk.build_conn_records(_tcp("A", 1_700_000_000.0), ["A"]))
+ entetes, fields, types, rows = lire_conn_log(texte)
+ assert entetes["set_separator"] == ","
+ assert entetes["empty_field"] == "(empty)"
+ assert entetes["unset_field"] == "-"
+ assert entetes["path"] == "conn"
+ assert entetes["open"] == "2023-11-14-22-13-20"
+ assert "close" in entetes
+ standard = [n for n, _t in zk.ZEEK_STANDARD_FIELDS]
+ # colonnes Zeek standard d'abord, dans l'ordre de Zeek, puis netcross_*
+ assert fields[: len(standard)] == standard
+ assert fields[:6] == ["ts", "uid", "id.orig_h", "id.orig_p", "id.resp_h", "id.resp_p"]
+ assert all(f.startswith("netcross_") for f in fields[len(standard) :])
+ assert len(types) == len(fields)
+ assert dict(zip(fields, types, strict=True))["ts"] == "time"
+ assert dict(zip(fields, types, strict=True))["id.orig_h"] == "addr"
+ assert dict(zip(fields, types, strict=True))["netcross_points"] == "set[string]"
+ assert texte.splitlines()[-1].startswith("#close\t")
+ assert len(rows) == 1
+
+
+def test_connexion_tcp_complete():
+ (row,) = lire_conn_log(zk.to_tsv(zk.build_conn_records(_tcp("A", 100.0), ["A"])))[3]
+ assert row["id.orig_h"] == "10.0.0.1" and row["id.orig_p"] == "50000"
+ assert row["id.resp_h"] == "10.0.0.2" and row["id.resp_p"] == "443"
+ assert row["proto"] == "tcp"
+ assert row["service"] == "ssl"
+ assert row["conn_state"] == "SF"
+ assert row["history"] == "ShADdFf"
+ assert row["orig_pkts"] == "4" and row["resp_pkts"] == "3"
+ assert row["orig_bytes"] == "100" and row["resp_bytes"] == "400"
+ assert row["orig_ip_bytes"] == str(74 + 66 + 166 + 66)
+ assert row["duration"] == "0.070000"
+ assert row["uid"].startswith("C") and len(row["uid"]) == 18
+ # champs que Netcross ne sait pas calculer : non renseignes, pas inventes
+ assert row["local_orig"] == "-" and row["missed_bytes"] == "-"
+ assert row["tunnel_parents"] == "(empty)"
+ # sans --order : pas de colonnes de segment
+ assert row["netcross_point"] == "A"
+ assert row["netcross_points"] == "A"
+ assert row["netcross_segment"] == "-" and row["netcross_loss_segment"] == "-"
+
+
+@pytest.mark.parametrize(
+ ("pkts", "etat"),
+ [
+ ([make_pkt(flags="SYN", sport=1, dport=2)], "S0"),
+ (
+ [
+ make_pkt(flags="SYN", sport=1, dport=2),
+ make_pkt(ts=0.1, flags="RST,ACK", src="10.0.0.2", dst="10.0.0.1", sport=2, dport=1),
+ ],
+ "REJ",
+ ),
+ (
+ [
+ make_pkt(flags="SYN", sport=1, dport=2),
+ make_pkt(ts=0.1, flags="SYN,ACK", src="10.0.0.2", dst="10.0.0.1", sport=2, dport=1),
+ ],
+ "S1",
+ ),
+ (
+ [
+ make_pkt(flags="SYN", sport=1, dport=2),
+ make_pkt(ts=0.1, flags="SYN,ACK", src="10.0.0.2", dst="10.0.0.1", sport=2, dport=1),
+ make_pkt(ts=0.2, flags="RST", sport=1, dport=2),
+ ],
+ "RSTO",
+ ),
+ (
+ [
+ make_pkt(flags="SYN", sport=1, dport=2),
+ make_pkt(ts=0.1, flags="SYN,ACK", src="10.0.0.2", dst="10.0.0.1", sport=2, dport=1),
+ make_pkt(ts=0.2, flags="RST", src="10.0.0.2", dst="10.0.0.1", sport=2, dport=1),
+ ],
+ "RSTR",
+ ),
+ (
+ [
+ make_pkt(flags="SYN", sport=1, dport=2),
+ make_pkt(ts=0.1, flags="FIN", sport=1, dport=2),
+ ],
+ "SH",
+ ),
+ ([make_pkt(flags="ACK", sport=1, dport=2)], "OTH"),
+ ([make_pkt(proto="UDP", sport=5353, dport=53)], "S0"),
+ (
+ [
+ make_pkt(proto="UDP", sport=5353, dport=53, dns_qry_name="example.org"),
+ make_pkt(ts=0.01, proto="UDP", src="10.0.0.2", dst="10.0.0.1", sport=53, dport=5353),
+ ],
+ "SF",
+ ),
+ ],
+)
+def test_etats_de_connexion(pkts, etat):
+ (rec,) = zk.build_conn_records(pkts, ["A"])
+ assert rec.conn_state == etat
+
+
+@pytest.mark.parametrize(
+ ("champs", "service"),
+ [
+ ({"http_is_request": True}, "http"),
+ ({"sip_call_id": "abc@host"}, "sip"),
+ ({"dhcp_msg_type": "1"}, "dhcp"),
+ ({"ssh_hassh": "ec7378c1a92f5a8dde7e8b7a1ddf33d1"}, "ssh"),
+ ({}, None),
+ ],
+)
+def test_service_atteste_par_la_dissection(champs, service):
+ (rec,) = zk.build_conn_records([make_pkt(**champs)], ["A"])
+ assert rec.service == service
+
+
+def test_historique_une_lettre_par_sens():
+ c = {"sport": 1, "dport": 2}
+ pkts = [
+ make_pkt(ts=0.0, flags="ACK", tcp_len=10, payload_hash="a", **c),
+ make_pkt(ts=0.1, flags="ACK", tcp_len=10, payload_hash="b", seq=2000, **c),
+ ]
+ (rec,) = zk.build_conn_records(pkts, ["A"])
+ assert rec.history == "D"
+ assert rec.orig_bytes == 20
+
+
+def test_drapeaux_tshark_positionnels():
+ # tcp.flags.str : 12 caracteres, les six derniers U A P R S F
+ assert zk.tcp_flag_names("··········S·") == {"SYN"}
+ assert zk.tcp_flag_names("·······A··S·") == {"ACK", "SYN"}
+ assert zk.tcp_flag_names("....R..") == {"RST"}
+ assert zk.tcp_flag_names("SYN,ACK") == {"SYN", "ACK"}
+ assert zk.tcp_flag_names(None) == frozenset()
+
+
+def test_icmp_type_et_code_dans_les_ports():
+ pkts = [
+ make_pkt(proto="ICMP", sport=None, dport=None, icmp_type=8, icmp_code=0),
+ make_pkt(ts=0.01, proto="ICMP", src="10.0.0.2", dst="10.0.0.1", sport=None, dport=None, icmp_type=0),
+ ]
+ (rec,) = zk.build_conn_records(pkts, ["A"])
+ assert (rec.proto, rec.orig_p, rec.resp_p) == ("icmp", 8, 0)
+ assert rec.orig_pkts == 1 and rec.resp_pkts == 1
+
+
+def test_arp_et_doublons_ignores():
+ pkts = [make_pkt(proto="ARP", sport=None, dport=None), make_pkt(is_duplicate=True)]
+ assert zk.build_conn_records(pkts, ["A"]) == []
+ entetes, fields, _types, rows = lire_conn_log(zk.to_tsv([]))
+ assert rows == [] and fields and entetes["open"] == "1970-01-01-00-00-00"
+
+
+def test_echappement_tsv():
+ rec = zk.build_conn_records(_tcp("LAN\tbis", 0.0), ["LAN\tbis"])[0]
+ _e, _f, _t, (row,) = lire_conn_log(zk.to_tsv([rec]))
+ assert row["netcross_point"] == "LAN\\x09bis"
+
+
+def test_deterministe():
+ a = zk.to_tsv(zk.build_conn_records(_tcp("A", 5.0), ["A"]))
+ b = zk.to_tsv(zk.build_conn_records(_tcp("A", 5.0), ["A"]))
+ assert a == b
+
+
+# -- multi-points ------------------------------------------------------------------------------
+
+
+def test_segments_latence_et_pertes_avec_order():
+ amont = _tcp("LAN", 100.0)
+ aval = _tcp("WAN", 100.0, lag=0.004)
+ perdu = aval.pop(3) # le ClientHello n'arrive pas au WAN
+ assert perdu.payload_hash == "p1"
+ recs = zk.build_conn_records(amont + aval, ["LAN", "WAN"], ["LAN", "WAN"])
+ par_point = {r.point: r for r in recs}
+ assert set(par_point) == {"LAN", "WAN"}
+ lan, wan = par_point["LAN"], par_point["WAN"]
+ assert lan.points_seen == ("LAN", "WAN") == wan.points_seen
+ assert lan.segment is None and lan.segment_lost_pkts is None
+ assert wan.segment == "LAN->WAN"
+ assert wan.segment_lost_pkts == 1
+ assert wan.segment_delay_ms == pytest.approx(4.0)
+ assert lan.loss_segment == wan.loss_segment == "LAN->WAN"
+ assert lan.uid != wan.uid
+ _e, _f, _t, rows = lire_conn_log(zk.to_tsv(recs))
+ row_wan = next(r for r in rows if r["netcross_point"] == "WAN")
+ assert row_wan["netcross_points"] == "LAN,WAN"
+ assert row_wan["netcross_segment_delay_ms"] == "4.000"
+ assert row_wan["netcross_segment_lost_pkts"] == "1"
+
+
+def test_sans_perte_pas_de_segment_de_perte():
+ recs = zk.build_conn_records(_tcp("A", 0.0) + _tcp("B", 0.0, lag=0.001), ["A", "B"], ["A", "B"])
+ assert all(r.loss_segment is None for r in recs)
+ assert next(r for r in recs if r.point == "B").segment_lost_pkts == 0
+
+
+# -- JSON --------------------------------------------------------------------------------------
+
+
+def test_variante_json_une_ligne_par_flux():
+ recs = zk.build_conn_records(_tcp("A", 100.0) + _tcp("B", 100.0, lag=0.002), ["A", "B"], ["A", "B"])
+ texte = zk.to_json_lines(recs)
+ lignes = texte.splitlines()
+ assert len(lignes) == 2 and texte.endswith("\n")
+ objets = [json.loads(ligne) for ligne in lignes]
+ premier = objets[0]
+ assert list(premier)[:6] == ["ts", "uid", "id.orig_h", "id.orig_p", "id.resp_h", "id.resp_p"]
+ assert premier["ts"] == pytest.approx(100.0)
+ assert premier["netcross_points"] == ["A", "B"]
+ # champs non renseignes omis, comme LogAscii::use_json
+ assert "local_orig" not in premier and "tunnel_parents" not in premier
+ assert "netcross_segment" not in premier
+ assert objets[1]["netcross_segment"] == "A->B"
+
+
+def test_ecriture_et_format_inconnu(tmp_path):
+ recs = zk.build_conn_records(_tcp("A", 0.0), ["A"])
+ chemin = zk.write_zeek_conn(recs, tmp_path / "conn.log")
+ assert lire_conn_log((tmp_path / "conn.log").read_text(encoding="utf-8"))[3]
+ assert chemin.endswith("conn.log")
+ zk.write_zeek_conn(recs, tmp_path / "conn.json", "json")
+ assert json.loads((tmp_path / "conn.json").read_text(encoding="utf-8"))["proto"] == "tcp"
+ with pytest.raises(ValueError, match="format Zeek inconnu"):
+ zk.write_zeek_conn(recs, tmp_path / "x", "csv")
+
+
+# -- --redact ----------------------------------------------------------------------------------
+
+
+def test_redact_aucune_adresse_reelle():
+ pkts = _tcp("A", 0.0, client="192.168.1.10", serveur="8.8.8.8")
+ reel = zk.to_tsv(zk.build_conn_records(_tcp("A", 0.0, "192.168.1.10", "8.8.8.8"), ["A"]))
+ redactor = redact_packets(pkts)
+ assert len(redactor) >= 2
+ texte = zk.to_tsv(zk.build_conn_records(pkts, ["A"]))
+ assert "192.168.1.10" not in texte and "8.8.8.8" not in texte
+ _e, _f, _t, (row,) = lire_conn_log(texte)
+ assert row["id.orig_h"] == pkts[0].src
+ # l'uid derive des valeurs pseudonymisees : different de celui de la capture reelle
+ assert row["uid"] != lire_conn_log(reel)[3][0]["uid"]
+
+
+# -- CLI ---------------------------------------------------------------------------------------
+
+
+@pytest.fixture
+def lance(monkeypatch):
+ pkts = [
+ *_tcp("A", 100.0, client="192.168.1.10", serveur="8.8.8.8"),
+ *_tcp("B", 100.0, client="192.168.1.10", serveur="8.8.8.8", lag=0.003),
+ ]
+
+ monkeypatch.setattr(
+ cli, "parse_capture", lambda label, path, raise_on_error=False: [p for p in pkts if p.point == label]
+ )
+
+ def _run(*argv):
+ monkeypatch.setattr(
+ sys,
+ "argv",
+ ["cross_capture_analyzer_cli.py", "--capture", "A=a.pcap", "--capture", "B=b.pcap", *map(str, argv)],
+ )
+ try:
+ cli.main()
+ except SystemExit as exc:
+ return exc.code
+ return 0
+
+ return _run
+
+
+def test_cli_zeek_conn_tsv_avec_redact(lance, tmp_path, capsys):
+ sortie = tmp_path / "conn.log"
+ assert lance("--order", "A,B", "--redact", "--zeek-conn", sortie) == 0
+ assert "Journal Zeek conn.log (tsv, 2 ligne(s))" in capsys.readouterr().out
+ texte = sortie.read_text(encoding="utf-8")
+ assert "192.168.1.10" not in texte and "8.8.8.8" not in texte
+ _e, _f, _t, rows = lire_conn_log(texte)
+ assert {r["netcross_point"] for r in rows} == {"A", "B"}
+ assert next(r for r in rows if r["netcross_point"] == "B")["netcross_segment"] == "A->B"
+
+
+def test_cli_zeek_conn_json(lance, tmp_path):
+ sortie = tmp_path / "conn.json"
+ assert lance("--zeek-conn", sortie, "--zeek-format", "json") == 0
+ objets = [json.loads(ligne) for ligne in sortie.read_text(encoding="utf-8").splitlines()]
+ assert len(objets) == 2 and objets[0]["id.orig_h"] == "192.168.1.10"
+
+
+def test_cli_zeek_conn_refuse_avec_merge(lance, tmp_path, capsys):
+ code = lance("--merge", tmp_path / "m.pcapng", "--zeek-conn", tmp_path / "c.log")
+ assert code not in (0, None)
+ assert "--zeek-conn" in capsys.readouterr().err
diff --git a/tests/tls13_keylog_capture.py b/tests/tls13_keylog_capture.py
index 22934348..94d88719 100644
--- a/tests/tls13_keylog_capture.py
+++ b/tests/tls13_keylog_capture.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""Capture TLS 1.3 + fichier de clés (SSLKEYLOGFILE) générés pour les tests (issue #1040).
Une vraie session TLS 1.3 (module ``ssl``, certificat autosigné éphémère) est
diff --git a/tests/tls_cert_fixtures.py b/tests/tls_cert_fixtures.py
index 576c49f5..111377ec 100644
--- a/tests/tls_cert_fixtures.py
+++ b/tests/tls_cert_fixtures.py
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Certificats X.509 auto-signes a algorithme FAIBLE, generes avec openssl 3.0
(issue #153) : `cryptography` refuse de SIGNER en SHA-1/MD5, ces deux cas ne
diff --git a/tools/captures_ecran_gui.py b/tools/captures_ecran_gui.py
index e6efdcac..7c9aff23 100644
--- a/tools/captures_ecran_gui.py
+++ b/tools/captures_ecran_gui.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Captures d'écran du guide utilisateur (issue #465).
diff --git a/tools/extract_lua_api.py b/tools/extract_lua_api.py
index 53bb54cd..802beeed 100644
--- a/tools/extract_lua_api.py
+++ b/tools/extract_lua_api.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
"""
Extraction de l'API Lua Wireshark vers JSON structure (issue #386).