Skip to content

Propose repo structure #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 14, 2023
Merged

Propose repo structure #1

merged 2 commits into from
Sep 14, 2023

Conversation

pwntester
Copy link

@pwntester pwntester commented Sep 13, 2023

QLPack structure proposal:

└── <LANG>
   ├── ext
   │  ├── library_sources
   │  │  ├── generated
   │  │  ├── manual
   │  │  └── qlpack.yml
   │  └── models
   │     ├── generated
   │     ├── manual
   │     └── qlpack.yml
   ├── test
   ├── lib
   │  ├── applications
   │  ├── frameworks
   │  ├── github
   │  └── qlpack.yml
   └── src
      ├── audit
      ├── CVEs
      ├── library_sources
      ├── qlpack.yml
      ├── security
      └── suites

src

This is a query pack containing:

  • audit: audit queries (eg: hotspots, attack surface, ...)
  • CVEs: CVE-specific queries (eg: log4shell)
  • library_sources: queries to identify 3rd party APIs called with untrusted data from applications
  • security: security queries (eg: Bean manipulation). These may eventually get pulled from the standard queries

lib

This library provides:

  • framework specific models that cannot be modelled with MaD. Need to be manually imported in Customizations.qll
  • "research mode" models. Need to be manually imported in Customizations.qll
  • application specific models (eg: Apache Dubbo specific sources). Need to be manually imported in Customizations.qll
  • github library. This is where common models used by the src query packs are located.

ext

This extension pack provides MaD models:

  • models/generated contains automatically-generated models (not verified)
  • models/manual contains manually-written models
  • library_sources/generated contains automatically-generated library-specific source models (eg: AbstractLogger.debug(0) for log4j)
  • library_sources/manual contains manually-written library-specific source models

Copy link
Contributor

@GeekMasher GeekMasher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm onboard!

@pwntester pwntester merged commit 7a58389 into main Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants