Issues, Merge Requests and Labels ================================= This page describes how changes to LibTIFF are tracked on `GitLab `_: every merge request has an issue, branches are named after that issue, and issues and merge requests are labelled so they can be found by what they affect and what goes wrong. The same rules apply to changes prepared with AI tools (see the :doc:`ai-policy`). Workflow -------- 1. **Open an issue first.** Every merge request must have a corresponding issue that describes the bug, feature or change. If one already exists, use it. For a bug, include a minimal reproducer against the current development sources (see :doc:`bugs`). For a security problem that should not be disclosed yet, make the issue confidential as described in :doc:`bugs`. 2. **Label the issue** as described under `Applying labels`_ below. 3. **Name the branch after the issue.** The branch name must start with the issue number, followed by a hyphen and a short description, for example ``1006-ojpeg-unset-compression`` for issue #1006. This applies to branches in a fork as well. When a merge request is created from such a branch, GitLab links it to the issue and adds ``Closes #1006`` to the description. The branch name alone does not copy the issue's labels. 4. **Open the merge request** against ``master``. The description must reference the issue (``Closes #nnn``, or ``Related to #nnn`` if it only partly addresses it). The merge request should carry the issue's labels, adjusted if the change turned out to affect other areas. If you have the Developer role or higher, copy them when creating the merge request: either use :guilabel:`Create merge request` on the issue page, which copies the issue's labels and milestone, or use ``glab``:: glab mr create --related-issue 1006 --copy-issue-labels With the REST API, pass the issue's labels in the ``labels`` field. Otherwise, a maintainer applies the labels (see `Who can set labels`_). 5. **One issue, one topic.** If a merge request grows to cover several unrelated problems, split it, and open an issue for each part. Applying labels --------------- Who can set labels ^^^^^^^^^^^^^^^^^^ GitLab restricts who can set and change labels, according to their role in the libtiff project: * **Issues:** the Planner role or higher. * **Merge requests:** the Developer role or higher. The Planner and Reporter roles cannot change merge request labels. Being the author of an issue or merge request does not, by itself, allow you to change its labels. Contributors who are not project members, including everyone opening a merge request from a fork, therefore cannot set labels. If you cannot set labels, list the labels you suggest at the end of the issue or merge request description, and a maintainer will apply them. What to label ^^^^^^^^^^^^^ Every issue and merge request should have: * **At least one area label** (``codec:``, ``lib:``, ``format:``, ``tool:``, ``contrib:``, ``build:``, ``ci``, ``platform:``, ``doc:`` or ``test:``) naming where the *fix* goes, not only where the symptom shows. Use as many as apply: a fix to the predictor used by LZW and Deflate gets ``codec:predictor``, ``codec:lzw`` and ``codec:deflate``. * **One** ``type::`` label. For bugs, also add: * **One or more** ``effect:`` labels describing what goes wrong. An integer overflow that leads to a heap overflow gets both ``effect:integer-overflow`` and ``effect:out-of-bounds``. * **One** ``trigger::`` label for the most exposed way to reach the bug. This is the main input to severity: a bug reachable by reading a crafted file affects every application that opens untrusted TIFF files, while one that needs an unusual sequence of API calls affects far fewer. * ``security`` if the bug has security impact, and ``cve`` once a CVE has been requested or assigned. * ``regression`` if it worked in an earlier release. Where relevant, add a ``source::`` label to say where a report came from (a fuzzer, Coverity or other static analysis, or an AI tool). Maintainers use the ``status::`` labels during triage and set a ``resolution::`` label when closing an issue without a fix. Issues that are self-contained and suitable for a new contributor are also labelled ``good-first-issue``, alongside any ``status::`` label. For example, issue #1006 ("Heap-buffer-overflow in OJPEGVSetField after TIFFUnsetField(TIFFTAG_COMPRESSION)") is labelled ``type::bug``, ``codec:ojpeg``, ``lib:fields``, ``effect:out-of-bounds`` and ``trigger::api-misuse``. Label naming ^^^^^^^^^^^^ Labels are grouped into families by prefix: * ``family:value`` (single colon): several values from the same family may be applied together, for example several ``codec:`` labels. * ``family::value`` (double colon): GitLab scoped labels. Only one value from the family can be set at a time; setting a new one replaces the old one. * ``security``, ``cve``, ``regression``, ``good-first-issue`` and ``ci`` stand alone. Available labels ---------------- Codecs ^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``codec:none`` - Uncompressed / dump mode (tif_dumpmode.c) * - ``codec:ccitt`` - CCITT RLE/Group 3/Group 4 fax (tif_fax3.c, tif_fax3sm.c, t4.h) * - ``codec:jbig`` - JBIG (tif_jbig.c, libjbig) * - ``codec:jpeg`` - JPEG via libjpeg/libjpeg-turbo, incl. 8/12-bit (tif_jpeg.c, tif_jpeg_12.c) * - ``codec:ojpeg`` - Old-style JPEG, compression 6 (tif_ojpeg.c) * - ``codec:lerc`` - LERC (tif_lerc.c, liblerc) * - ``codec:logluv`` - SGILog / LogLuv (tif_luv.c) * - ``codec:lzma`` - LZMA2 / xz (tif_lzma.c) * - ``codec:lzw`` - LZW (tif_lzw.c) * - ``codec:next`` - NeXT 2-bit RLE (tif_next.c) * - ``codec:packbits`` - PackBits (tif_packbits.c) * - ``codec:pixarlog`` - PixarLog (tif_pixarlog.c) * - ``codec:thunder`` - ThunderScan 4-bit RLE (tif_thunder.c) * - ``codec:webp`` - WebP (tif_webp.c, libwebp) * - ``codec:deflate`` - Deflate/ZIP via zlib or libdeflate (tif_zip.c) * - ``codec:zstd`` - Zstandard (tif_zstd.c) * - ``codec:predictor`` - Horizontal/floating-point predictor shared by LZW/Deflate/etc. (tif_predict.c) * - ``codec:new`` - Request or proposal for a new compression scheme (JPEG 2000, JPEG XL/XR, OpenZL, ...) Library subsystems ^^^^^^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``lib:open-close`` - Opening/closing handles, modes and TIFFOpenOptions (tif_open.c, tif_close.c) * - ``lib:io`` - Platform I/O back ends and memory mapping (tif_unix.c, tif_win32.c, mmap) * - ``lib:dir-read`` - Reading IFDs and tag values (tif_dirread.c), IFD loop detection * - ``lib:dir-write`` - Writing/rewriting IFDs (tif_dirwrite.c), checkpoint, append * - ``lib:fields`` - Tag definitions, TIFFSetField/GetField, custom tags and extenders (tif_dir.c, tif_dirinfo.c) * - ``lib:custom-dir`` - EXIF, GPS and other custom directories * - ``lib:read`` - Strip/tile/scanline reading and buffer setup (tif_read.c) * - ``lib:write`` - Strip/tile/scanline writing and flushing (tif_write.c, tif_flush.c) * - ``lib:strile`` - Strip/tile geometry, size computation, deferred strile loading (tif_strip.c, tif_tile.c) * - ``lib:rgba`` - RGBA image interface (tif_getimage.c) * - ``lib:color`` - Colour conversions: YCbCr, CIELab (tif_color.c) * - ``lib:codec-api`` - Codec framework, registration and configuration (tif_codec.c, tif_compress.c) * - ``lib:print`` - TIFFPrintDirectory (tif_print.c) * - ``lib:swab`` - Byte swapping and fill order (tif_swab.c) * - ``lib:memory`` - Allocation wrappers, memory limits, error/warning handlers (tif_aux.c, tif_error.c, tif_warning.c) * - ``lib:cxx`` - C++ stream interface (tif_stream.cxx, tiffio.hxx, libtiffxx) * - ``lib:api`` - Public headers, exported symbols, API/ABI compatibility (tiffio.h, tiff.h, libtiff.def/.map) Format features ^^^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``format:bigtiff`` - BigTIFF-specific handling (64-bit offsets, LONG8/IFD8) * - ``format:ycbcr`` - YCbCr subsampling and packed YCbCr data * - ``format:dng`` - TIFF/EP, DNG and other derived formats Tools ^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``tool:fax2ps`` - fax2ps (fax to PostScript; tools/fax2ps.c, doc/tools/fax2ps.rst) * - ``tool:fax2tiff`` - fax2tiff (fax to TIFF; tools/fax2tiff.c, doc/tools/fax2tiff.rst) * - ``tool:pal2rgb`` - pal2rgb (palette to RGB; tools/pal2rgb.c, doc/tools/pal2rgb.rst) * - ``tool:ppm2tiff`` - ppm2tiff (PPM/PGM/PBM to TIFF; tools/ppm2tiff.c, doc/tools/ppm2tiff.rst) * - ``tool:raw2tiff`` - raw2tiff (raw data to TIFF; tools/raw2tiff.c, doc/tools/raw2tiff.rst) * - ``tool:rgb2ycbcr`` - rgb2ycbcr (RGB to YCbCr; tools/rgb2ycbcr.c, doc/tools/rgb2ycbcr.rst) * - ``tool:thumbnail`` - thumbnail (make thumbnail; tools/thumbnail.c, doc/tools/thumbnail.rst) * - ``tool:tiff2bw`` - tiff2bw (to greyscale; tools/tiff2bw.c, doc/tools/tiff2bw.rst) * - ``tool:tiff2pdf`` - tiff2pdf (TIFF to PDF; tools/tiff2pdf.c, doc/tools/tiff2pdf.rst) * - ``tool:tiff2ps`` - tiff2ps (TIFF to PostScript; tools/tiff2ps.c, doc/tools/tiff2ps.rst) * - ``tool:tiff2rgba`` - tiff2rgba (TIFF to RGBA; tools/tiff2rgba.c, doc/tools/tiff2rgba.rst) * - ``tool:tiffcmp`` - tiffcmp (compare; tools/tiffcmp.c, doc/tools/tiffcmp.rst) * - ``tool:tiffcp`` - tiffcp (copy/convert; tools/tiffcp.c, doc/tools/tiffcp.rst) * - ``tool:tiffcrop`` - tiffcrop (crop/rotate/extract; tools/tiffcrop.c, doc/tools/tiffcrop.rst) * - ``tool:tiffdither`` - tiffdither (dither; tools/tiffdither.c, doc/tools/tiffdither.rst) * - ``tool:tiffdump`` - tiffdump (dump raw directory; tools/tiffdump.c, doc/tools/tiffdump.rst) * - ``tool:tiffgt`` - tiffgt (OpenGL viewer; tools/tiffgt.c, doc/tools/tiffgt.rst) * - ``tool:tiffinfo`` - tiffinfo (print info; tools/tiffinfo.c, doc/tools/tiffinfo.rst) * - ``tool:tiffmedian`` - tiffmedian (median-cut quantise; tools/tiffmedian.c, doc/tools/tiffmedian.rst) * - ``tool:tiffset`` - tiffset (set tags; tools/tiffset.c, doc/tools/tiffset.rst) * - ``tool:tiffsplit`` - tiffsplit (split multi-page; tools/tiffsplit.c, doc/tools/tiffsplit.rst) * - ``tool:common`` - Shared tool infrastructure (tools/tiff_tools.c/.h, port/ getopt, tools build) * - ``tool:archived`` - Unsupported tools moved to archive/ (bmp2tiff, gif2tiff, ras2tiff, sgi2tiff, ...) Contributed code ^^^^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``contrib:addtiffo`` - contrib/addtiffo overview builder * - ``contrib:iptcutil`` - contrib/iptcutil * - ``contrib:oss-fuzz`` - Fuzzing harnesses in contrib/oss-fuzz * - ``contrib:other`` - Other contrib/ code (dbs, pds, ras, stream, tags, win_dib, mfs) Build, packaging and CI ^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``build:cmake`` - CMake build (CMakeLists.txt, cmake/) * - ``build:autotools`` - Autotools build (configure.ac, Makefile.am, m4/) * - ``build:dependencies`` - Detection/linking of optional external libraries (zlib, libjpeg, libdeflate, liblzma, zstd, webp, lerc, jbig) * - ``build:packaging`` - Install layout, pkg-config, CMake package config, versioning, release tooling * - ``build:warnings`` - Compiler warnings, -Dfatal-warnings, sanitizer and strict-mode builds * - ``ci`` - CI pipelines (.gitlab-ci.yml, ``build/gitlab-ci*``, appveyor) Platforms ^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``platform:windows`` - Windows: MSVC, MinGW, Cygwin, tif_win32.c * - ``platform:macos`` - macOS / Apple toolchains, iOS * - ``platform:32-bit`` - 32-bit targets and type-width portability * - ``platform:big-endian`` - Big-endian hosts and byte-order handling * - ``platform:other`` - Other platforms: BSDs, OpenVMS, Android, embedded Documentation ^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``doc:api`` - Library function reference (doc/functions/, doc/libtiff.rst) * - ``doc:tools`` - Tool manual pages (doc/tools/) * - ``doc:project`` - Project, build, release notes and website docs (doc/project, doc/releases, README, CONTRIBUTING) Tests ^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``test:regression`` - Script and C regression tests in test/ * - ``test:unit`` - GoogleTest unit tests in test/unit/ * - ``test:images`` - Test images and reference outputs (test/images, test/refs) Effect: what goes wrong ^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``effect:out-of-bounds`` - Out-of-bounds read or write (heap/stack/global buffer overflow) * - ``effect:use-after-free`` - Use-after-free, double free, invalid free * - ``effect:null-deref`` - NULL pointer dereference / SEGV on NULL * - ``effect:integer-overflow`` - Integer overflow, wrap or other undefined behaviour (UBSan) * - ``effect:uninitialised`` - Use of uninitialised memory; heap contents disclosed in output * - ``effect:leak`` - Memory or resource leak * - ``effect:resource-exhaustion`` - Excessive memory/CPU, infinite loop, hang (DoS) * - ``effect:assertion`` - Reachable assert() or abort() * - ``effect:wrong-output`` - Incorrect decoded/encoded data, wrong values printed or written * - ``effect:error-handling`` - Errors ignored, misreported or success reported on failure * - ``effect:compatibility`` - Valid file rejected or not readable; interoperability with other software * - ``effect:performance`` - Speed or memory-efficiency problem (not a DoS) * - ``effect:build-failure`` - Fails to configure, compile or link Trigger: how a bug is reached ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``trigger::crafted-file`` - Reachable by reading a malicious or malformed TIFF file * - ``trigger::writer`` - Reachable only when writing, from caller-controlled data * - ``trigger::api-misuse`` - Only reachable through an unusual or invalid API call sequence * - ``trigger::cli`` - Reachable through command-line arguments of a tool Type ^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``type::bug`` - Defect in existing behaviour * - ``type::feature`` - New capability or format support * - ``type::enhancement`` - Improvement to existing behaviour, API or UX * - ``type::refactor`` - Internal restructuring, cleanup or modernisation without behaviour change * - ``type::question`` - Usage question or support request * - ``type::proposal`` - RFC, design or process proposal Triage status ^^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``status::needs-info`` - Waiting for the reporter (details, sample file, versions) * - ``status::needs-reproducer`` - No minimal reproducer against current master yet * - ``status::confirmed`` - Reproduced by a maintainer Resolution ^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``resolution::not-a-bug`` - Working as designed * - ``resolution::wontfix`` - Valid, but will not be changed * - ``resolution::cannot-reproduce`` - Could not be reproduced * - ``resolution::duplicate`` - Duplicate of another issue * - ``resolution::unmaintained`` - Affects removed or unmaintained code Source ^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``source::fuzzer`` - Found by fuzzing (OSS-Fuzz, AFL, libFuzzer, ...) * - ``source::coverity`` - Reported by Coverity Scan * - ``source::static-analysis`` - Reported by other static analysis (scan-build, cppcheck, ...) * - ``source::ai-tool`` - Found or drafted with an AI tool (see AI policy) * - ``source::bugzilla`` - Imported from the old Bugzilla tracker Other labels ^^^^^^^^^^^^ .. list-table:: :header-rows: 1 :widths: 25 75 * - Label - Use for * - ``security`` - Has security impact; follow HOWTO-SECURITY-RELEASE * - ``cve`` - A CVE identifier has been requested or assigned * - ``regression`` - Worked in an earlier release * - ``good-first-issue`` - Self-contained, suitable for a new contributor