[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACEZDA5ZZ1F183EAZ40NKM":3,"skill-same:01M6ACEZDA5ZZ1F183EAZ40NKM":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":17,"updatedAt":65,"install":66,"resources":79},"01M6ACEZDA5ZZ1F183EAZ40NKM","oss-fuzz","OSS-Fuzz 模糊测试","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\".","在本地针对工作树检出版本运行 Tika 的 OSS-Fuzz Jazzer 目标 — 构建镜像、从本地源码构建 fuzzers、运行某个 fuzz 目标、执行 corpus 作为回归测试、复现崩溃、添加种子。用于“fuzz OneNote 解析器”、“针对这些文件运行 OneNoteParserFuzzer”、“复现 OSS-Fuzz 崩溃”、“合并前 fuzz 我的分支”。","apache\u002Ftika","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACEMPJD6J74AGZBFFEGEYV",4145,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Foss-fuzz\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSJ8FPTACYEEYRWQRNFXKY","安全检测工程","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"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":9,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add apache\u002Ftika --skill oss-fuzz",{"tool":72,"command":73},"bunx","bunx skills add apache\u002Ftika --skill oss-fuzz",{"tool":75,"command":76},"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,[],[81,120,145,174,204,229],{"skillNo":82,"name":83,"nameZh":84,"description":85,"descriptionZh":86,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":87,"categories":88,"keywords":95,"publishedAt":52},"01M6ACFKZR081Z7QX5XB1ZA2R2","file-to-markdown","任意文件转 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.","将几乎任何文件转换为 Markdown 并附带元数据 — PDF、Office、HTML、电子邮件、压缩包、图片、音频\u002F视频、1000 多种格式 — 由 Apache Tika 驱动，可通过 tika-app CLI（零配置、单文件）或运行中的 tika-server（curl、常驻进程、适合多次调用）使用。默认以 rmeta（结构化、可感知嵌入项的输出）作为默认操作，而非扁平拼接的文本，因为你无法从文件扩展名判断文件是否包含嵌入内容。涵盖仅元数据分类、类型与语言检测、OCR，以及针对智能体上下文的输出大小控制。当任务涉及读取你不想手动解析的文件内容时使用。","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-to-markdown\u002FSKILL.md",[89,92],{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":93,"categoryName":94,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TRAEZFJ43R95HPEBJYG","知识工作者",[96,97,98,99,100,10,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119],"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":121,"name":122,"nameZh":123,"description":124,"descriptionZh":125,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":126,"categories":127,"keywords":132,"publishedAt":52},"01M6ACFHJR3612ZE6RNX1P5WG9","file-to-markdown-docker","Docker 版 Tika 文件转 Markdown","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.","当你需要确保可用的 OCR（扫描 PDF、图像）或地理空间栅格支持且无需本地安装时，将 Apache Tika 作为 Docker 容器运行——apache\u002Ftika:\u003Cversion>-full 捆绑了 Tesseract、GDAL、ImageMagick 和字体。还涵盖最小镜像、端口\u002F卷\u002F内存约定、路径一致性挂载陷阱，以及如何确认 OCR 确实运行而非静默返回空文本。由 Apache Tika 驱动。当本地 tika-app\u002Ftika-server 未安装 Tesseract，或你想要一个一次性的自包含解析环境时使用。是 file-to-markdown 技能的配套技能，后者在服务器启动后负责具体的解析调用。","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-to-markdown-docker\u002FSKILL.md",[128,129],{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":130,"categoryName":131,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",[133,134,96,97,98,10,135,136,49,51,137,105,106,108,109,138,139,140,45,141,142,115,143,117,144],"file to markdown docker","docker","support","memory","identity","which","volume","up","how to","when","fonts","self",{"skillNo":146,"name":147,"nameZh":148,"description":149,"descriptionZh":150,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":151,"categories":152,"keywords":155,"publishedAt":52},"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.\"","检查文件自我声明的信息与其实际包含的内容——由 Apache Tika 驱动。基于内容的真实类型检测（扩展名可能说谎）、来源声明（作者、日期、创建应用）、修订和篡改迹象（PDF 增量更新、修订痕迹、隐藏幻灯片、zip 完整性）、隐藏和嵌入内容（附件、宏）、风险指标（PDF JavaScript 动作、加密）以及内容摘要。收集证据而非下达结论：Tika 报告文件的声明内容与解析观察到的内容；它不归属作者身份，也不验证签名。用于可疑文件分类、来源溯源问题、电子发现式审查，或判断'这个文件是否名副其实'。","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fusers\u002Ffile-forensics\u002FSKILL.md",[153,154],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[156,98,157,158,159,99,10,160,103,161,105,162,163,44,164,165,166,167,168,169,170,171,172,173],"file forensics","forensics","javascript","suspicious","validate","review","actions","signatures","updates","encryption","reports","claims","signals","revision","integrity","zip","evidence","risk",{"skillNo":175,"name":176,"nameZh":177,"description":178,"descriptionZh":179,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":180,"categories":181,"keywords":186,"publishedAt":52},"01M6ACFB92SPADF0FY4490B847","update-site-for-release","Tika 发布网站更新","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\".","为发布而更新\u002F发布 Apache Tika 网站（tika-site SVN 仓库）——发布流程的第 17 步。处理 4.x 分支（Changes 页面 + 聚合 javadoc + Antora 文档分支）与 3.x 维护分支（完整的逐版本 apt 文档 + javadoc）。用于'更新网站'、'发布 X.Y.Z 的网站'、'发布中的网站部分'。","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Fupdate-site-for-release\u002FSKILL.md",[182,183],{"categoryNo":130,"categoryName":131,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":184,"categoryName":185,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQNXPY1AV6BSR5VKHDMWRH","部署与发布管理",[187,188,189,38,190,10,191,192,105,48,193,194,195,196,197,198,199,200,36,201,202,203],"update","release","update site for release","site","release process","docs","publish","track","website","svn","full","apt","page","repo","version","changes","maintenance",{"skillNo":205,"name":206,"nameZh":207,"description":208,"descriptionZh":209,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":210,"categories":211,"keywords":216,"publishedAt":52},"01M6ACF9G52NYHXQ0BVSJ3VH6E","tika-eval-h2-query","tika-eval H2 数据库查询","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.","直接查询 tika-eval 的 H2 数据库，获取现成报告无法计算的统计数据和表连接——包括连接注意事项、关键表和示例查询。当 xlsx\u002Fsummary.md 报告不够用时调用。","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Ftika-eval-h2-query\u002FSKILL.md",[212,213],{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":214,"categoryName":215,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",[217,105,218,219,220,221,222,38,223,36,142,224,166,225,226,227,228],"tika eval h2 query","eval","query","database","xlsx","do","example","compute","queries","summary","connection","tables",{"skillNo":230,"name":231,"nameZh":232,"description":233,"descriptionZh":234,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":235,"categories":236,"keywords":239,"publishedAt":52},"01M6ACF7V56CCWHNVR614VBNX5","tika-eval-encoding-regression","Tika 编码检测回归排查","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.","精简版 tika-eval 模式，用于排查字符集检测器回归问题（如'A 选择编码 X，B 选择 Y'），使用单一构建和两套配置——编码对翻转查询、OOV\u002F语言性\u002FFFFD 信号，以及逐文件检测器归因。","https:\u002F\u002Fgithub.com\u002Fapache\u002Ftika\u002Fblob\u002Fmain\u002F.skills\u002Fdevs\u002Ftika-eval-encoding-regression\u002FSKILL.md",[237,238],{"categoryNo":90,"categoryName":91,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":214,"categoryName":215,"taxonomyType":23,"taxonomyTypeDesc":24},[240,105,46,218,241,38,242,98,225,168,243,244,245,246],"tika eval encoding regression","encoding","attribution","build","detector","pattern","pair"]