osquery / osquery/osquery

select * from file where directory like "C:\{foo}\%%" does not return expected results

Open
#6,883 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core
Dominant language
C++
Stars
23.6k
Forks
2.6k
Avg merge
6d 7h
Merged PRs (30d)
14

Description

Bug report

What operating system and version are you using?
 version = 10.0.19041
   build = 19041
platform = windows
What version of osquery are you using?
version = 4.5.1
What steps did you take to reproduce the issue?
> mkdir "C:\{foo}"
> mkdir "C:\{foo}\bar"
> echo test > "C:\{foo}\bar\test.txt"
> osqueryi --line "SELECT * from file where directory LIKE 'C:\{foo}\%%'"
What did you expect to see?
 path = C:\{foo}\bar\test.txt
What did you see instead?

No output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the query with osqueryi on Windows using the commands and osquery 4.5.1 shown in the report. Trace how the file table handles the directory LIKE pattern, and consider the issue done when the query returns C:{foo}\bar\test.txt as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.