[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACEZDA5ZZ1F183EAZ40NKM":3,"skill-same:01M6ACEZDA5ZZ1F183EAZ40NKM":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":6,"updatedAt":58,"install":59,"resources":72},"01M6ACEZDA5ZZ1F183EAZ40NKM","oss-fuzz",null,"Run Tika's OSS-Fuzz Jazzer targets locally against a working-tree checkout — build the image, build fuzzers from local source, fuzz a target, run a corpus as a regression pass, reproduce a crash, and add seeds. Use for \"fuzz the OneNote parser\", \"run OneNoteParserFuzzer against these files\", \"reproduce an OSS-Fuzz crash\", \"fuzz my branch before merge\".","apache\u002Ftika","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACEMPJD6J74AGZBFFEGEYV",4145,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Foss-fuzz\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"oss","oss fuzz","parser","target","targets","use","OneNote","for","as","tree","add","source","my","files","local","regression","checkout","branch","image","merge","run","2026-11-10 10:12:30",false,"---\nname: oss-fuzz\ndescription: >\n  Run Tika's OSS-Fuzz Jazzer targets locally against a working-tree checkout —\n  build the image, build fuzzers from local source, fuzz a target, run a corpus\n  as a regression pass, reproduce a crash, and add seeds. Use for \"fuzz the\n  OneNote parser\", \"run OneNoteParserFuzzer against these files\", \"reproduce an\n  OSS-Fuzz crash\", \"fuzz my branch before merge\".\n---\n\n\u003C!--\nLicensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements.  See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the \"License\"); you may not use this file except in compliance with\nthe License.  You may obtain a copy of the License at\n\n    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\nLocal override: `$TIKA_SKILLS_LOCAL\u002Foss-fuzz\u002FLOCAL.md` (default `~\u002F.tika-skills`),\nread after this file, wins on conflict.\n\n# Tika OSS-Fuzz — local fuzzing\n\nFor fuzzing or replaying a directory of files without Docker, use the in-repo\n`tika-fuzzing` module (Jazzer `@FuzzTest`, see `tika-fuzzing\u002FREADME.md`). On a host with\nTesseract installed, pass `-Dtika.fuzz.config=src\u002Ftest\u002Fresources\u002Ftika-config-no-ocr.json`:\notherwise every embedded image is OCR'd and parses time out falsely. This skill\ncovers the OSS-Fuzz project, whose targets still live in the oss-fuzz repo.\n\nTika is already in OSS-Fuzz as the **`apache-tika`** project (not `tika`).\nIt is Jazzer-based (coverage-guided, in-process JVM fuzzing), like today's\n`tika-fuzzing` module; the older seed-mutation module of that name was removed in\nTIKA-4506. The fuzz targets\nand seed logic live in the **oss-fuzz** repo under\n`projects\u002Fapache-tika\u002F`, *not* in this repo:\n\n- `project-parent\u002Ffuzz-targets\u002Fsrc\u002Fmain\u002Fjava\u002Fcom\u002Fexample\u002F*Fuzzer.java` — one\n  Jazzer target per parser family. Each calls `ParserFuzzer.parseOne(...)`\n  (parse-from-bytes and parse-from-file) and swallows\n  `TikaException | SAXException | IOException`; anything else — `Error`\n  (OOM, StackOverflow), a hang, or an unexpected `RuntimeException` — is a\n  finding.\n- `build.sh` — builds `tika-app`, then the `fuzz-targets` module.\n- `build_seeds.sh` — packs Tika's own unit-test files into\n  `\u003CTarget>_seed_corpus.zip` by file extension.\n\nTargets (as of this writing): `AudioVideoParsersFuzzer`,\n`AutoDetectParserFuzzer`, `CompressorParserFuzzer`, `HtmlParserFuzzer`,\n`ImageParsersFuzzer`, `JackcessParserFuzzer`, `OOXMLParserFuzzer`,\n`OfficeParserFuzzer`, `OneNoteParserFuzzer`, `PDFParserFuzzer`,\n`PackageParserFuzzer`, `RFC822ParserFuzzer`, `RTFParserFuzzer`,\n`TextAndCSVParserFuzzer`, `XMLReaderUtilsFuzzer`. `ParserFuzzer` is the shared\nhelper, not a target (`build.sh` skips it). This list drifts — get the current\none after a build with `ls build\u002Fout\u002Fapache-tika\u002F*Fuzzer`, or from source with\n`find $OSSFUZZ\u002Fprojects\u002Fapache-tika\u002Fproject-parent\u002Ffuzz-targets -name '*Fuzzer.java'`.\n\nPrimary contact on the project is `tallison@apache.org`, so OSS-Fuzz crash\nmail \u002F ClusterFuzz notifications land in that inbox — check there for what\ncontinuous fuzzing has already found before treating a bug as newly discovered.\n\n## Prerequisites\n\n- Docker daemon running (`docker ps`).\n- A local oss-fuzz checkout: `git clone --depth 1 https:\u002F\u002Fgithub.com\u002Fgoogle\u002Foss-fuzz`.\n  All `helper.py` commands run from the oss-fuzz root. `$OSSFUZZ` below = that dir.\n- `python3` (helper.py is Python).\n- **An amd64 host.** The OSS-Fuzz base images are amd64-only, so every `docker\n  run` here pins `--platform linux\u002Famd64`. On Apple Silicon that is qemu\n  emulation — slow for a CPU-bound fuzzing workload and it distorts exactly the\n  timing-based findings this skill tells you to trust, so treat `-timeout` \u002F\n  slow-unit results under emulation as suspect and run real campaigns on a native\n  amd64 box.\n- **Disk:** budget many GB — the base-builder\u002Fbase-runner images are multi-GB\n  each, plus `build\u002Fout` and any corpus copies.\n\n## 1. Build the image (non-interactive)\n\n`build_image` **prompts** to pull base images; a plain background\u002Fnon-tty run\ndies with `EOFError: EOF when reading a line`. Always pass `--no-pull` (or\n`--pull` to force a refresh) and redirect stdin:\n\n```bash\ncd $OSSFUZZ\npython3 infra\u002Fhelper.py build_image --no-pull apache-tika \u003C \u002Fdev\u002Fnull\n```\n\nPulls the `base-builder-jvm` image on first run (multi-GB); slow once, cached after.\n\n## 2. Build fuzzers from a LOCAL checkout (the point of local dev)\n\nGive `build_fuzzers` a source path and it mounts your working tree over the\nDockerfile's `git clone` of Tika — so it fuzzes uncommitted code (a branch\nunder review, a candidate cap-fix), not upstream `main`.\n\n**Gotcha — the mount path is nested.** The Dockerfile clones Tika into\n`$SRC\u002Fproject-parent\u002Ftika`, but `helper.py` defaults a local mount to\n`\u002Fsrc\u002Ftika` (basename of `main_repo`). The default lands in the wrong place and\nthe build silently uses the baked-in clone instead of your tree. Pin it:\n\n```bash\npython3 infra\u002Fhelper.py build_fuzzers \\\n  --mount_path \u002Fsrc\u002Fproject-parent\u002Ftika \\\n  apache-tika \u002Fhome\u002F\u003Cuser>\u002Fpath\u002Fto\u002Ftika\n```\n\n**Verify the mount actually took** before trusting any result — a wrong\n`--mount_path` fails open (silently builds the baked-in upstream clone and\nreports clean). The reliable check is a negative control: inject a guaranteed\ncompile error into a source file on the build path (e.g. a bare\n`THIS_MUST_NOT_COMPILE` token in `OneNoteParser.java`), rebuild, and confirm the\nbuild **fails at your file and line**. If it still succeeds, the mount is being\nignored. Then revert and rebuild clean. Note the failure surfaces as a\n**spotless lint error** naming your file:line (`removeUnusedImports ... error:\n\u003Cidentifier> expected`), not a raw javac message — spotless runs first. Watch\nthe real exit code, not a wrapper's: `helper.py` prints\n`ERROR:__main__:Building fuzzers failed.` and exits non-zero on failure.\n\nSanity-check the target exists after build:\n`ls build\u002Fout\u002Fapache-tika\u002FOneNoteParserFuzzer`.\n\n## 3a. Regression pass over YOUR OWN corpus (run each file once)\n\nThe common ask — \"run `OneNoteParserFuzzer` against these files\" — is a\nread-only regression pass: execute each of your inputs once, report crashes,\nchange nothing.\n\n**Do NOT use `helper.py run_fuzzer --corpus-dir` for this.** That path is\ndestructive and does not run your files: the base-runner `run_fuzzer` wrapper\n**clears the mounted corpus dir and unpacks the baked-in\n`\u003CTarget>_seed_corpus.zip`** (Tika's own unit-test files) into it, then fuzzes\nthose. Point it at a 260-file corpus and it runs the ~12 seed files instead and\nwipes your dir down to libFuzzer's minimized set. Two failure modes in one: a\nfalse \"no crash\" (it ran the seeds, which never crash) and a destroyed corpus.\n\nInstead, invoke the built target **binary directly**, bypassing the wrapper, with\nyour corpus as a libFuzzer positional arg and `-runs=0` (load corpus, run each\nonce, exit — no mutation). Keep the pristine corpus elsewhere and hand the\ncontainer a throwaway copy:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Cthrowaway-corpus-copy>:\u002Fcorpus \\\n  -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -runs=0 -timeout=60 -rss_limit_mb=3600 \u002Fcorpus'\n```\n\nMount `\u002Fout` (the target script resolves its Jazzer jars and classpath from its\nown dir). `Done N runs` should equal your file count — if it says ~12, you hit\nthe seed-corpus substitution above.\n\n**Corpus must be a FLAT dir of files.** libFuzzer does not recurse into\nsubdirectories. A sharded\u002Fnested corpus (e.g. `onenote\u002Fa3\u002F47\u002F\u003Csha>`) must be\nflattened first — and flatten **collision-safe**: a plain `cp` of a human-named\ntree (`a\u002Ftest.pdf`, `b\u002Ftest.pdf`) silently overwrites, so you fuzz fewer files\nthan you think (the same \"ran fewer than expected\" trap this section opened\nwith). Name each flattened file by its content hash, which also dedups identical\ninputs:\n\n```bash\nmkdir -p flat\nfind \u003Cnested> -type f -exec sh -c 'cp \"$1\" flat\u002F$(sha1sum \"$1\" | cut -c1-40)' _ {} \\;\n```\n\n(sha-named source blobs are already unique; the hash-rename makes any corpus safe).\n\n## 3b. Open-ended (mutational) fuzzing\n\nDrop `-runs=0` and let Jazzer mutate from the corpus to hunt new paths. Use the\n**direct-binary** invocation again, not `helper.py run_fuzzer --corpus-dir` — that\nwrapper still clears your dir and substitutes the baked seed corpus (see 3a).\nMount a **writable** working copy of the corpus (libFuzzer writes new\ncoverage-increasing units back into it; keep the pristine corpus elsewhere) and\nan artifact dir for any reproducer it finds:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Cwritable-corpus-copy>:\u002Fcorpus -v \u003Cartifact-dir>:\u002Fartifacts \\\n  -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -max_total_time=1200 -timeout=60 \\\n           -rss_limit_mb=3600 -artifact_prefix=\u002Fartifacts\u002F \u002Fcorpus'\n```\n\n(If you ever do route flags through `helper.py run_fuzzer`, they need a `--`\nseparator — `run_fuzzer ... OneNoteParserFuzzer -- -runs=0` — or argparse rejects\nthe leading-dash flags. The direct-binary form above avoids that entirely.)\n\nMemory note: `build.sh` runs these targets at `-Xmx3000m -rss_limit_mb=3600` on\npurpose — audio\u002Fvideo\u002Fimage\u002Fonenote parsers hit `new byte[~Integer.MAX_VALUE]`\nsingle-allocation OOMs. An OOM under ~2–3 GB is a real finding; if you see one\nabove the rss limit, the fix is a bound in the parser, not a bigger heap.\n\n### Finding → fixing → re-fuzzing (usually whack-a-mole)\n\nlibFuzzer **halts on the first finding** by default — so one campaign yields one\nbug, and an early crash\u002FOOM\u002Fhang after a few hundred execs means the target\nbarely explored the space. That is not a clean bill of health.\n\nYou *can* enumerate several bugs in one run: `-fork=1` with `-ignore_crashes` \u002F\n`-ignore_ooms` \u002F `-ignore_timeouts` keeps going past each finding and drops one\nartifact per distinct crash. That genuinely works when the bugs sit on\n**independent paths** — two roughly-equally-reachable bugs, neither downstream of\nthe other.\n\nWhat it does **not** do is get you past a bug that *blocks* what's behind it. A\nresource-exhaustion bug (unbounded allocation, runaway recursion, hang) is a\n**wall**: every input that reaches it dies *there*, so code *downstream on that\nsame path* never executes and its bugs stay invisible no matter how long you fuzz\nor how many `-ignore_*` flags you set. And in practice the easy, early bugs tend\nto sit on shared entry paths and block the harder, deeper ones — so ignoring them\nmostly burns cycles re-hitting the same wall. That tendency (not a law) is why the\nloop is usually:\n\n1. Fuzz until it halts on a finding; save the reproducer.\n2. **Fix that bug** in the parser (bound the count\u002Farray, cap the recursion) so the\n   input survives past it.\n3. Rebuild fuzzers (step 2 above) against the fix.\n4. Re-fuzz — mutations now proceed past the old wall and reach the next bug.\n\nRule of thumb: reach for `-ignore_*`\u002F`-fork` to *triage breadth* (roughly how many\nindependent problems are in here?); fix-and-re-fuzz to actually make *depth*\nprogress past a blocker.\n\nCorollary: a wall early in a shared entry point (e.g. an OOM in the legacy\n`OneNotePtr` path) also blocks fuzzing of *sibling* code (the fsshttpb\u002FMS-ONESTORE\npath), because mutations that flip the format-routing bytes fall into the wall\nbefore reaching the sibling. Fix the walls nearest the entry point first.\n\n## 3c. Tuning heap, timeout, and RSS limit\n\nThe generated target wrapper (`build\u002Fout\u002Fapache-tika\u002F\u003CTarget>`) bakes in\n`--jvm_args=\"-Xmx3000m:-Xss1024k\"` and `-rss_limit_mb=3600mb`, then appends\nwhatever args you pass (`$@`). So:\n\n- **Per-input timeout** (hang cutoff): `-timeout=\u003Csec>` — a libFuzzer flag, passes\n  straight through. A single input exceeding it is reported as a slow-unit \u002F\n  timeout finding.\n- **RSS OOM trigger**: `-rss_limit_mb=\u003CN>` — libFuzzer flag, passes through; the\n  process is killed (exit 71) when total RSS crosses it.\n- **JVM heap**: append `--jvm_args=-Xmx\u003CN>m:-Xss1024k`. The wrapper's `$@` lands\n  *after* its own `--jvm_args`, and **Jazzer's last `--jvm_args` wins** (verified:\n  appending `-Xmx1024m` makes the JVM throw at ~1 GB, printing\n  `use '-Xmx921m' to reproduce`). **Testing at a lower heap (~1 GB) is the point** —\n  it surfaces allocation-heavy parses far sooner than the 3 GB default, and turns\n  a bare libFuzzer RSS-OOM (no stack) into a `java.lang.OutOfMemoryError` that\n  Jazzer prints *with a Java stack trace*.\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Ccorpus-or-artifact>:\u002Fin -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -timeout=60 -rss_limit_mb=3600 \\\n           --jvm_args=-Xmx1024m:-Xss1024k \u002Fin\u002F\u003Creproducer>'\n```\n\n**Caveat — the OOM stack is the straw, not always the cause.** Capping the heap\nmakes the JVM throw wherever it happens to run out; that frame is where the\ncollector gave up, not necessarily the runaway allocation. Use it as a *lead*:\nwalk up the stack and confirm the unbounded count\u002Farray in code, or take a heap\nhistogram (dominant object class) to find what actually accumulated. (Real\nexample: a heap-capped OOM surfaced at `PropertyValue.\u003Cinit>`, but the cause was\nan unbounded 32-bit count two frames up driving `Stream.generate(...).limit(val32)`.)\n\n**Caveat — colon-bearing JVM options are SILENTLY DROPPED by `--jvm_args`.**\nJazzer splits `--jvm_args` on `:` and creates the JVM with `ignoreUnrecognized`,\nso an option that itself contains a colon (`-XX:+HeapDumpOnOutOfMemoryError`,\n`-Xlog:gc`) is split into fragments and then **silently ignored — no error, no\neffect** (verified: `--jvm_args=-XX:+PrintFlagsFinal` printed no flag dump and\nexited 0). That is worse than an error — you think a flag is set when it isn't.\nColon-free options (`-Xmx`, `-Xss`) go through fine. For `-XX`\u002F`-Xlog` flags, use\nthe `JAVA_TOOL_OPTIONS` env var instead — the embedded JVM reads it directly\n(verified: `-e JAVA_TOOL_OPTIONS=-XX:+PrintFlagsFinal` logs `Picked up\nJAVA_TOOL_OPTIONS` and dumps the flag table):\n`-e JAVA_TOOL_OPTIONS='-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\u002Fin'`.\n\n## 4. Reproduce a specific crash\n\nRun the target **binary** on the single testcase — the direct form used\nthroughout this skill (and the one verified here). A file positional makes\nlibFuzzer run just that input and exit:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Cdir-with-testcase>:\u002Fin -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -rss_limit_mb=3600 \u002Fin\u002F\u003Ctestcase>'\n```\n\nAdd `--jvm_args=-Xmx1024m:-Xss1024k` for a Java stack on an OOM (§3c). Rebuild\nfuzzers (step 2) against a candidate fix and re-run to confirm the crash clears.\n`helper.py reproduce apache-tika \u003CTarget> \u003Cfile>` does the same via the wrapper\nand is safe — it runs a single testcase, not a corpus dir, so the\n`run_fuzzer --corpus-dir` destruction in §3a does not apply.\n\n## 5. Add seeds \u002F a new target\n\n- **Seeds:** edit `projects\u002Fapache-tika\u002Fbuild_seeds.sh` — one `find ... -name\n  '*.ext' | xargs zip -u \u003CTarget>_seed_corpus.zip` line per extension. Real,\n  structurally-valid files matter far more than count: coverage-guided fuzzing\n  needs a seed that already passes the parser's magic\u002Fstructure checks to reach\n  the interesting code (a OneNote seed must carry the `.one` GUID header). A\n  private\u002Freal-document corpus stays local — do not commit it to oss-fuzz.\n  - **Gathering a real corpus from Common Crawl:**\n    [`commoncrawl-fetcher-lite`](https:\u002F\u002Fgithub.com\u002Ftballison\u002Fcommoncrawl-fetcher-lite)\n    samples binary files out of Common Crawl by HTTP-declared and Tika-detected\n    type (skipping truncated payloads) into an output directory — a fast way to\n    assemble a large, format-specific, structurally-valid corpus for a target.\n- **New target:** add `FooParserFuzzer.java` next to the others following the\n  `ParserFuzzer.parseOne` + swallow-expected-exceptions pattern.\n\n## Cleanup — the container leaves root-owned files in your working tree\n\n`build_fuzzers` with a local `--mount_path` compiles your working tree *inside\nthe container as root*, so `target\u002F` dirs (and other build outputs) in the\nmounted checkout come back **root-owned** — a later host-side `.\u002Fmvnw clean`\nthen fails with permission errors. When you are done fuzzing, run the clean\n**from the container** (root can delete its own files) against the same mount:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 \\\n  -v \u002Fpath\u002Fto\u002Ftika:\u002Fsrc\u002Fproject-parent\u002Ftika \\\n  gcr.io\u002Foss-fuzz\u002Fapache-tika \\\n  bash -c 'cd \u002Fsrc\u002Fproject-parent\u002Ftika && .\u002Fmvnw clean -Pfast -Dmaven.repo.local=\u002Ftmp\u002Fm2'\n```\n\nUse a throwaway in-container repo path for `-Dmaven.repo.local` (as above) so\nthe clean itself does not write root-owned files into the host `.local_m2_repo`.\nVerify nothing is left behind: `find \u002Fpath\u002Fto\u002Ftika -user root | head` should\nprint nothing.\n\n## Disclosure caveat (read before touching the public project)\n\nThe `apache-tika` project on Google's infra **auto-files bugs and discloses on\na 90-day timer.** For findings we are deliberately holding private — e.g. the\nmetadata-extractor HEIF\u002FWebP\u002FTIFF DoS bugs routed through ASF security \u002F the\nTika PMC — keep the work **local**: do not push seeds or targets that reach an\nundisclosed bug to the public oss-fuzz repo, and do not open the finding\nupstream. `ImageParsersFuzzer` drives Tika → metadata-extractor, so a strong\nimage corpus can surface exactly those; verify a fix locally, but disclose\nthrough the agreed channel, not by letting OSS-Fuzz file it. See the 4.0.1 TODO\n(image-parser DoS items) for what is under embargo.\n\n**Triage: JIRA or security@?** Per the\nhttps:\u002F\u002Ftika.apache.org\u002Fsecurity-model.html[security model]: a hostile file\nmaking an in-process parse throw, hang, or exhaust memory\u002Fstack is a bug\n(JIRA); anything reaching the host — path traversal, code execution, SSRF,\ndata leaving the sandbox — is security@. If the page doesn't answer, ask on\nprivate@ before filing publicly.\n\n## Git policy\n\nEditing files under a local `oss-fuzz` checkout is fine, but the same\nnever-commit\u002Fnever-push default applies (see `.skills\u002Fdevs\u002Fdevelopment\u002FSKILL.md`): stage and\nhand back a suggested message; the maintainer pushes to oss-fuzz.\n","\u003C!--\nLicensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements.  See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the \"License\"); you may not use this file except in compliance with\nthe License.  You may obtain a copy of the License at\n\n    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\nLocal override: `$TIKA_SKILLS_LOCAL\u002Foss-fuzz\u002FLOCAL.md` (default `~\u002F.tika-skills`),\nread after this file, wins on conflict.\n\n# Tika OSS-Fuzz — local fuzzing\n\nFor fuzzing or replaying a directory of files without Docker, use the in-repo\n`tika-fuzzing` module (Jazzer `@FuzzTest`, see `tika-fuzzing\u002FREADME.md`). On a host with\nTesseract installed, pass `-Dtika.fuzz.config=src\u002Ftest\u002Fresources\u002Ftika-config-no-ocr.json`:\notherwise every embedded image is OCR'd and parses time out falsely. This skill\ncovers the OSS-Fuzz project, whose targets still live in the oss-fuzz repo.\n\nTika is already in OSS-Fuzz as the **`apache-tika`** project (not `tika`).\nIt is Jazzer-based (coverage-guided, in-process JVM fuzzing), like today's\n`tika-fuzzing` module; the older seed-mutation module of that name was removed in\nTIKA-4506. The fuzz targets\nand seed logic live in the **oss-fuzz** repo under\n`projects\u002Fapache-tika\u002F`, *not* in this repo:\n\n- `project-parent\u002Ffuzz-targets\u002Fsrc\u002Fmain\u002Fjava\u002Fcom\u002Fexample\u002F*Fuzzer.java` — one\n  Jazzer target per parser family. Each calls `ParserFuzzer.parseOne(...)`\n  (parse-from-bytes and parse-from-file) and swallows\n  `TikaException | SAXException | IOException`; anything else — `Error`\n  (OOM, StackOverflow), a hang, or an unexpected `RuntimeException` — is a\n  finding.\n- `build.sh` — builds `tika-app`, then the `fuzz-targets` module.\n- `build_seeds.sh` — packs Tika's own unit-test files into\n  `\u003CTarget>_seed_corpus.zip` by file extension.\n\nTargets (as of this writing): `AudioVideoParsersFuzzer`,\n`AutoDetectParserFuzzer`, `CompressorParserFuzzer`, `HtmlParserFuzzer`,\n`ImageParsersFuzzer`, `JackcessParserFuzzer`, `OOXMLParserFuzzer`,\n`OfficeParserFuzzer`, `OneNoteParserFuzzer`, `PDFParserFuzzer`,\n`PackageParserFuzzer`, `RFC822ParserFuzzer`, `RTFParserFuzzer`,\n`TextAndCSVParserFuzzer`, `XMLReaderUtilsFuzzer`. `ParserFuzzer` is the shared\nhelper, not a target (`build.sh` skips it). This list drifts — get the current\none after a build with `ls build\u002Fout\u002Fapache-tika\u002F*Fuzzer`, or from source with\n`find $OSSFUZZ\u002Fprojects\u002Fapache-tika\u002Fproject-parent\u002Ffuzz-targets -name '*Fuzzer.java'`.\n\nPrimary contact on the project is `tallison@apache.org`, so OSS-Fuzz crash\nmail \u002F ClusterFuzz notifications land in that inbox — check there for what\ncontinuous fuzzing has already found before treating a bug as newly discovered.\n\n## Prerequisites\n\n- Docker daemon running (`docker ps`).\n- A local oss-fuzz checkout: `git clone --depth 1 https:\u002F\u002Fgithub.com\u002Fgoogle\u002Foss-fuzz`.\n  All `helper.py` commands run from the oss-fuzz root. `$OSSFUZZ` below = that dir.\n- `python3` (helper.py is Python).\n- **An amd64 host.** The OSS-Fuzz base images are amd64-only, so every `docker\n  run` here pins `--platform linux\u002Famd64`. On Apple Silicon that is qemu\n  emulation — slow for a CPU-bound fuzzing workload and it distorts exactly the\n  timing-based findings this skill tells you to trust, so treat `-timeout` \u002F\n  slow-unit results under emulation as suspect and run real campaigns on a native\n  amd64 box.\n- **Disk:** budget many GB — the base-builder\u002Fbase-runner images are multi-GB\n  each, plus `build\u002Fout` and any corpus copies.\n\n## 1. Build the image (non-interactive)\n\n`build_image` **prompts** to pull base images; a plain background\u002Fnon-tty run\ndies with `EOFError: EOF when reading a line`. Always pass `--no-pull` (or\n`--pull` to force a refresh) and redirect stdin:\n\n```bash\ncd $OSSFUZZ\npython3 infra\u002Fhelper.py build_image --no-pull apache-tika \u003C \u002Fdev\u002Fnull\n```\n\nPulls the `base-builder-jvm` image on first run (multi-GB); slow once, cached after.\n\n## 2. Build fuzzers from a LOCAL checkout (the point of local dev)\n\nGive `build_fuzzers` a source path and it mounts your working tree over the\nDockerfile's `git clone` of Tika — so it fuzzes uncommitted code (a branch\nunder review, a candidate cap-fix), not upstream `main`.\n\n**Gotcha — the mount path is nested.** The Dockerfile clones Tika into\n`$SRC\u002Fproject-parent\u002Ftika`, but `helper.py` defaults a local mount to\n`\u002Fsrc\u002Ftika` (basename of `main_repo`). The default lands in the wrong place and\nthe build silently uses the baked-in clone instead of your tree. Pin it:\n\n```bash\npython3 infra\u002Fhelper.py build_fuzzers \\\n  --mount_path \u002Fsrc\u002Fproject-parent\u002Ftika \\\n  apache-tika \u002Fhome\u002F\u003Cuser>\u002Fpath\u002Fto\u002Ftika\n```\n\n**Verify the mount actually took** before trusting any result — a wrong\n`--mount_path` fails open (silently builds the baked-in upstream clone and\nreports clean). The reliable check is a negative control: inject a guaranteed\ncompile error into a source file on the build path (e.g. a bare\n`THIS_MUST_NOT_COMPILE` token in `OneNoteParser.java`), rebuild, and confirm the\nbuild **fails at your file and line**. If it still succeeds, the mount is being\nignored. Then revert and rebuild clean. Note the failure surfaces as a\n**spotless lint error** naming your file:line (`removeUnusedImports ... error:\n\u003Cidentifier> expected`), not a raw javac message — spotless runs first. Watch\nthe real exit code, not a wrapper's: `helper.py` prints\n`ERROR:__main__:Building fuzzers failed.` and exits non-zero on failure.\n\nSanity-check the target exists after build:\n`ls build\u002Fout\u002Fapache-tika\u002FOneNoteParserFuzzer`.\n\n## 3a. Regression pass over YOUR OWN corpus (run each file once)\n\nThe common ask — \"run `OneNoteParserFuzzer` against these files\" — is a\nread-only regression pass: execute each of your inputs once, report crashes,\nchange nothing.\n\n**Do NOT use `helper.py run_fuzzer --corpus-dir` for this.** That path is\ndestructive and does not run your files: the base-runner `run_fuzzer` wrapper\n**clears the mounted corpus dir and unpacks the baked-in\n`\u003CTarget>_seed_corpus.zip`** (Tika's own unit-test files) into it, then fuzzes\nthose. Point it at a 260-file corpus and it runs the ~12 seed files instead and\nwipes your dir down to libFuzzer's minimized set. Two failure modes in one: a\nfalse \"no crash\" (it ran the seeds, which never crash) and a destroyed corpus.\n\nInstead, invoke the built target **binary directly**, bypassing the wrapper, with\nyour corpus as a libFuzzer positional arg and `-runs=0` (load corpus, run each\nonce, exit — no mutation). Keep the pristine corpus elsewhere and hand the\ncontainer a throwaway copy:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Cthrowaway-corpus-copy>:\u002Fcorpus \\\n  -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -runs=0 -timeout=60 -rss_limit_mb=3600 \u002Fcorpus'\n```\n\nMount `\u002Fout` (the target script resolves its Jazzer jars and classpath from its\nown dir). `Done N runs` should equal your file count — if it says ~12, you hit\nthe seed-corpus substitution above.\n\n**Corpus must be a FLAT dir of files.** libFuzzer does not recurse into\nsubdirectories. A sharded\u002Fnested corpus (e.g. `onenote\u002Fa3\u002F47\u002F\u003Csha>`) must be\nflattened first — and flatten **collision-safe**: a plain `cp` of a human-named\ntree (`a\u002Ftest.pdf`, `b\u002Ftest.pdf`) silently overwrites, so you fuzz fewer files\nthan you think (the same \"ran fewer than expected\" trap this section opened\nwith). Name each flattened file by its content hash, which also dedups identical\ninputs:\n\n```bash\nmkdir -p flat\nfind \u003Cnested> -type f -exec sh -c 'cp \"$1\" flat\u002F$(sha1sum \"$1\" | cut -c1-40)' _ {} \\;\n```\n\n(sha-named source blobs are already unique; the hash-rename makes any corpus safe).\n\n## 3b. Open-ended (mutational) fuzzing\n\nDrop `-runs=0` and let Jazzer mutate from the corpus to hunt new paths. Use the\n**direct-binary** invocation again, not `helper.py run_fuzzer --corpus-dir` — that\nwrapper still clears your dir and substitutes the baked seed corpus (see 3a).\nMount a **writable** working copy of the corpus (libFuzzer writes new\ncoverage-increasing units back into it; keep the pristine corpus elsewhere) and\nan artifact dir for any reproducer it finds:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Cwritable-corpus-copy>:\u002Fcorpus -v \u003Cartifact-dir>:\u002Fartifacts \\\n  -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -max_total_time=1200 -timeout=60 \\\n           -rss_limit_mb=3600 -artifact_prefix=\u002Fartifacts\u002F \u002Fcorpus'\n```\n\n(If you ever do route flags through `helper.py run_fuzzer`, they need a `--`\nseparator — `run_fuzzer ... OneNoteParserFuzzer -- -runs=0` — or argparse rejects\nthe leading-dash flags. The direct-binary form above avoids that entirely.)\n\nMemory note: `build.sh` runs these targets at `-Xmx3000m -rss_limit_mb=3600` on\npurpose — audio\u002Fvideo\u002Fimage\u002Fonenote parsers hit `new byte[~Integer.MAX_VALUE]`\nsingle-allocation OOMs. An OOM under ~2–3 GB is a real finding; if you see one\nabove the rss limit, the fix is a bound in the parser, not a bigger heap.\n\n### Finding → fixing → re-fuzzing (usually whack-a-mole)\n\nlibFuzzer **halts on the first finding** by default — so one campaign yields one\nbug, and an early crash\u002FOOM\u002Fhang after a few hundred execs means the target\nbarely explored the space. That is not a clean bill of health.\n\nYou *can* enumerate several bugs in one run: `-fork=1` with `-ignore_crashes` \u002F\n`-ignore_ooms` \u002F `-ignore_timeouts` keeps going past each finding and drops one\nartifact per distinct crash. That genuinely works when the bugs sit on\n**independent paths** — two roughly-equally-reachable bugs, neither downstream of\nthe other.\n\nWhat it does **not** do is get you past a bug that *blocks* what's behind it. A\nresource-exhaustion bug (unbounded allocation, runaway recursion, hang) is a\n**wall**: every input that reaches it dies *there*, so code *downstream on that\nsame path* never executes and its bugs stay invisible no matter how long you fuzz\nor how many `-ignore_*` flags you set. And in practice the easy, early bugs tend\nto sit on shared entry paths and block the harder, deeper ones — so ignoring them\nmostly burns cycles re-hitting the same wall. That tendency (not a law) is why the\nloop is usually:\n\n1. Fuzz until it halts on a finding; save the reproducer.\n2. **Fix that bug** in the parser (bound the count\u002Farray, cap the recursion) so the\n   input survives past it.\n3. Rebuild fuzzers (step 2 above) against the fix.\n4. Re-fuzz — mutations now proceed past the old wall and reach the next bug.\n\nRule of thumb: reach for `-ignore_*`\u002F`-fork` to *triage breadth* (roughly how many\nindependent problems are in here?); fix-and-re-fuzz to actually make *depth*\nprogress past a blocker.\n\nCorollary: a wall early in a shared entry point (e.g. an OOM in the legacy\n`OneNotePtr` path) also blocks fuzzing of *sibling* code (the fsshttpb\u002FMS-ONESTORE\npath), because mutations that flip the format-routing bytes fall into the wall\nbefore reaching the sibling. Fix the walls nearest the entry point first.\n\n## 3c. Tuning heap, timeout, and RSS limit\n\nThe generated target wrapper (`build\u002Fout\u002Fapache-tika\u002F\u003CTarget>`) bakes in\n`--jvm_args=\"-Xmx3000m:-Xss1024k\"` and `-rss_limit_mb=3600mb`, then appends\nwhatever args you pass (`$@`). So:\n\n- **Per-input timeout** (hang cutoff): `-timeout=\u003Csec>` — a libFuzzer flag, passes\n  straight through. A single input exceeding it is reported as a slow-unit \u002F\n  timeout finding.\n- **RSS OOM trigger**: `-rss_limit_mb=\u003CN>` — libFuzzer flag, passes through; the\n  process is killed (exit 71) when total RSS crosses it.\n- **JVM heap**: append `--jvm_args=-Xmx\u003CN>m:-Xss1024k`. The wrapper's `$@` lands\n  *after* its own `--jvm_args`, and **Jazzer's last `--jvm_args` wins** (verified:\n  appending `-Xmx1024m` makes the JVM throw at ~1 GB, printing\n  `use '-Xmx921m' to reproduce`). **Testing at a lower heap (~1 GB) is the point** —\n  it surfaces allocation-heavy parses far sooner than the 3 GB default, and turns\n  a bare libFuzzer RSS-OOM (no stack) into a `java.lang.OutOfMemoryError` that\n  Jazzer prints *with a Java stack trace*.\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Ccorpus-or-artifact>:\u002Fin -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -timeout=60 -rss_limit_mb=3600 \\\n           --jvm_args=-Xmx1024m:-Xss1024k \u002Fin\u002F\u003Creproducer>'\n```\n\n**Caveat — the OOM stack is the straw, not always the cause.** Capping the heap\nmakes the JVM throw wherever it happens to run out; that frame is where the\ncollector gave up, not necessarily the runaway allocation. Use it as a *lead*:\nwalk up the stack and confirm the unbounded count\u002Farray in code, or take a heap\nhistogram (dominant object class) to find what actually accumulated. (Real\nexample: a heap-capped OOM surfaced at `PropertyValue.\u003Cinit>`, but the cause was\nan unbounded 32-bit count two frames up driving `Stream.generate(...).limit(val32)`.)\n\n**Caveat — colon-bearing JVM options are SILENTLY DROPPED by `--jvm_args`.**\nJazzer splits `--jvm_args` on `:` and creates the JVM with `ignoreUnrecognized`,\nso an option that itself contains a colon (`-XX:+HeapDumpOnOutOfMemoryError`,\n`-Xlog:gc`) is split into fragments and then **silently ignored — no error, no\neffect** (verified: `--jvm_args=-XX:+PrintFlagsFinal` printed no flag dump and\nexited 0). That is worse than an error — you think a flag is set when it isn't.\nColon-free options (`-Xmx`, `-Xss`) go through fine. For `-XX`\u002F`-Xlog` flags, use\nthe `JAVA_TOOL_OPTIONS` env var instead — the embedded JVM reads it directly\n(verified: `-e JAVA_TOOL_OPTIONS=-XX:+PrintFlagsFinal` logs `Picked up\nJAVA_TOOL_OPTIONS` and dumps the flag table):\n`-e JAVA_TOOL_OPTIONS='-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\u002Fin'`.\n\n## 4. Reproduce a specific crash\n\nRun the target **binary** on the single testcase — the direct form used\nthroughout this skill (and the one verified here). A file positional makes\nlibFuzzer run just that input and exit:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 --shm-size=2g \\\n  -e FUZZING_ENGINE=libfuzzer -e SANITIZER=address \\\n  -v \u003Cdir-with-testcase>:\u002Fin -v $HOME\u002Foss-fuzz\u002Fbuild\u002Fout\u002Fapache-tika:\u002Fout \\\n  -t gcr.io\u002Foss-fuzz-base\u002Fbase-runner:latest \\\n  bash -c '\u002Fout\u002FOneNoteParserFuzzer -rss_limit_mb=3600 \u002Fin\u002F\u003Ctestcase>'\n```\n\nAdd `--jvm_args=-Xmx1024m:-Xss1024k` for a Java stack on an OOM (§3c). Rebuild\nfuzzers (step 2) against a candidate fix and re-run to confirm the crash clears.\n`helper.py reproduce apache-tika \u003CTarget> \u003Cfile>` does the same via the wrapper\nand is safe — it runs a single testcase, not a corpus dir, so the\n`run_fuzzer --corpus-dir` destruction in §3a does not apply.\n\n## 5. Add seeds \u002F a new target\n\n- **Seeds:** edit `projects\u002Fapache-tika\u002Fbuild_seeds.sh` — one `find ... -name\n  '*.ext' | xargs zip -u \u003CTarget>_seed_corpus.zip` line per extension. Real,\n  structurally-valid files matter far more than count: coverage-guided fuzzing\n  needs a seed that already passes the parser's magic\u002Fstructure checks to reach\n  the interesting code (a OneNote seed must carry the `.one` GUID header). A\n  private\u002Freal-document corpus stays local — do not commit it to oss-fuzz.\n  - **Gathering a real corpus from Common Crawl:**\n    [`commoncrawl-fetcher-lite`](https:\u002F\u002Fgithub.com\u002Ftballison\u002Fcommoncrawl-fetcher-lite)\n    samples binary files out of Common Crawl by HTTP-declared and Tika-detected\n    type (skipping truncated payloads) into an output directory — a fast way to\n    assemble a large, format-specific, structurally-valid corpus for a target.\n- **New target:** add `FooParserFuzzer.java` next to the others following the\n  `ParserFuzzer.parseOne` + swallow-expected-exceptions pattern.\n\n## Cleanup — the container leaves root-owned files in your working tree\n\n`build_fuzzers` with a local `--mount_path` compiles your working tree *inside\nthe container as root*, so `target\u002F` dirs (and other build outputs) in the\nmounted checkout come back **root-owned** — a later host-side `.\u002Fmvnw clean`\nthen fails with permission errors. When you are done fuzzing, run the clean\n**from the container** (root can delete its own files) against the same mount:\n\n```bash\ndocker run --rm --platform linux\u002Famd64 \\\n  -v \u002Fpath\u002Fto\u002Ftika:\u002Fsrc\u002Fproject-parent\u002Ftika \\\n  gcr.io\u002Foss-fuzz\u002Fapache-tika \\\n  bash -c 'cd \u002Fsrc\u002Fproject-parent\u002Ftika && .\u002Fmvnw clean -Pfast -Dmaven.repo.local=\u002Ftmp\u002Fm2'\n```\n\nUse a throwaway in-container repo path for `-Dmaven.repo.local` (as above) so\nthe clean itself does not write root-owned files into the host `.local_m2_repo`.\nVerify nothing is left behind: `find \u002Fpath\u002Fto\u002Ftika -user root | head` should\nprint nothing.\n\n## Disclosure caveat (read before touching the public project)\n\nThe `apache-tika` project on Google's infra **auto-files bugs and discloses on\na 90-day timer.** For findings we are deliberately holding private — e.g. the\nmetadata-extractor HEIF\u002FWebP\u002FTIFF DoS bugs routed through ASF security \u002F the\nTika PMC — keep the work **local**: do not push seeds or targets that reach an\nundisclosed bug to the public oss-fuzz repo, and do not open the finding\nupstream. `ImageParsersFuzzer` drives Tika → metadata-extractor, so a strong\nimage corpus can surface exactly those; verify a fix locally, but disclose\nthrough the agreed channel, not by letting OSS-Fuzz file it. See the 4.0.1 TODO\n(image-parser DoS items) for what is under embargo.\n\n**Triage: JIRA or security@?** Per the\nhttps:\u002F\u002Ftika.apache.org\u002Fsecurity-model.html[security model]: a hostile file\nmaking an in-process parse throw, hang, or exhaust memory\u002Fstack is a bug\n(JIRA); anything reaching the host — path traversal, code execution, SSRF,\ndata leaving the sandbox — is security@. If the page doesn't answer, ask on\nprivate@ before filing publicly.\n\n## Git policy\n\nEditing files under a local `oss-fuzz` checkout is fine, but the same\nnever-commit\u002Fnever-push default applies (see `.skills\u002Fdevs\u002Fdevelopment\u002FSKILL.md`): stage and\nhand back a suggested message; the maintainer pushes to oss-fuzz.\n",{"name":5,"description":7},"main","ed8a8913a232395cd764fb6cafae3123f72a193e",".skills\u002Fdevs\u002Foss-fuzz",1039,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika","https:\u002F\u002Ftika.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-13 08:35:47",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add apache\u002Ftika --skill oss-fuzz",{"tool":65,"command":66},"bunx","bunx skills add apache\u002Ftika --skill oss-fuzz",{"tool":68,"command":69},"pnpm","pnpm dlx skills add apache\u002Ftika --skill oss-fuzz","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Foss-fuzz\u002FSKILL.md",true,[],[74,112,135,161,185,210],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":87,"publishedAt":45},"01M6ACFKZR081Z7QX5XB1ZA2R2","file-to-markdown","Turn almost any file into Markdown plus metadata — PDF, Office, HTML, email, archives, images, audio\u002Fvideo, 1000+ formats — powered by Apache Tika, either via the tika-app CLI (zero setup, one file) or a running tika-server (curl, warm process, many calls). Leads with rmeta (structured, embedded-item-aware output) as the default operation rather than flat concatenated text, since you can't tell whether a file has embedded content from its extension. Covers metadata-only triage, type and language detection, OCR, and output-size discipline for agent context. Use whenever a task involves reading the content of a file whose format you don't want to hand-parse.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-to-markdown\u002FSKILL.md",[80,83,84],{"categoryNo":81,"categoryName":82,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":85,"categoryName":86,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[88,89,90,91,92,9,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"file to markdown","markdown","file","PDF","cli","triage","setup","content","metadata","tika","images","Video","app","ocr","Audio","parse","default","only","either","you","hand","text","server","discipline",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":122,"publishedAt":45},"01M6ACFHJR3612ZE6RNX1P5WG9","file-to-markdown-docker","Run Apache Tika as a Docker container when you need guaranteed OCR (scanned PDFs, images) or geospatial raster support with zero local install — `apache\u002Ftika:\u003Cversion>-full` bundles Tesseract, GDAL, ImageMagick, and fonts. Also covers the minimal image, port\u002Fvolume\u002Fmemory conventions, the path-identity mount gotcha, and how to confirm OCR actually ran rather than silently returning no text. Powered by Apache Tika. Use when a local `tika-app`\u002F`tika-server` doesn't have Tesseract installed, or you want a disposable, self-contained parsing environment. Companion to the `file-to-markdown` skill, which covers the parsing calls themselves once a server is up.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-to-markdown-docker\u002FSKILL.md",[118,119],{"categoryNo":81,"categoryName":82,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":120,"categoryName":121,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",[123,124,88,89,90,9,125,126,42,44,127,97,98,100,101,128,129,130,38,131,132,107,133,109,134],"file to markdown docker","docker","support","memory","identity","which","volume","up","how to","when","fonts","self",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":142,"publishedAt":45},"01M6ACFE1684DE184VE0D7PQVY","file-forensics","Examine what a file claims about itself and what it actually contains — powered by Apache Tika. True content-based type detection (extensions lie), provenance claims (authors, dates, creating application), revision and tamper signals (PDF incremental updates, tracked changes, hidden slides, zip integrity), hidden and embedded content (attachments, macros), risk indicators (PDF JavaScript actions, encryption), and content digests. Evidence gathering, not verdicts: Tika reports what the file asserts and what parsing observed; it does not attribute authorship or validate signatures. Use for triaging suspicious files, provenance questions, e-discovery-style review, or \"is this file what it claims to be.\"","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002FSKILL.md",[141],{"categoryNo":81,"categoryName":82,"taxonomyType":21,"taxonomyTypeDesc":22},[143,90,144,145,146,91,9,147,95,148,97,149,150,37,151,152,153,154,155,156,157,158,159,160],"file forensics","forensics","javascript","suspicious","validate","review","actions","signatures","updates","encryption","reports","claims","signals","revision","integrity","zip","evidence","risk",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":45},"01M6ACFB92SPADF0FY4490B847","update-site-for-release","Update\u002Fpublish the Apache Tika website (tika-site SVN repo) for a release — step 17 of the Release Process. Handles the 4.x track (Changes page + aggregate javadoc + Antora docs branch) vs the 3.x maintenance track (full per-version apt docs + javadoc). Use for \"update the site\", \"publish the site for X.Y.Z\", \"the website part of the release\".","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Fupdate-site-for-release\u002FSKILL.md",[],[168,169,170,31,171,9,172,173,97,41,174,175,176,177,178,179,180,181,29,182,183,184],"update","release","update site for release","site","release process","docs","publish","track","website","svn","full","apt","page","repo","version","changes","maintenance",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":197,"publishedAt":45},"01M6ACF9G52NYHXQ0BVSJ3VH6E","tika-eval-h2-query","Query the tika-eval H2 database directly for counts and joins the canned reports do not compute — connection gotchas, key tables, example queries. Use when the xlsx\u002Fsummary.md reports are not enough.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Ftika-eval-h2-query\u002FSKILL.md",[191,194],{"categoryNo":192,"categoryName":193,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000004","电子表格",{"categoryNo":195,"categoryName":196,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",[198,97,199,200,201,202,203,31,204,29,132,205,153,206,207,208,209],"tika eval h2 query","eval","query","database","xlsx","do","example","compute","queries","summary","connection","tables",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":214,"categories":215,"keywords":216,"publishedAt":45},"01M6ACF7V56CCWHNVR614VBNX5","tika-eval-encoding-regression","Condensed tika-eval pattern for charset-detector regression hunts (\"A picks encoding X, B picks Y\") using one build and two configs — encoding-pair flip queries, OOV\u002Flanguageness\u002FFFFD signals, per-file detector attribution.","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Ftika-eval-encoding-regression\u002FSKILL.md",[],[217,97,39,199,218,31,219,90,206,155,220,221,222,223],"tika eval encoding regression","encoding","attribution","build","detector","pattern","pair"]