Skip to content

Commit 3ee7e3b

Browse files
committed
⭐ remove manifest files + replace with version in resources.json
1 parent cdd36e6 commit 3ee7e3b

File tree

81 files changed

+10243
-21999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+10243
-21999
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ data/
1717
providers/*.resources.json
1818
providers/*/dist
1919
providers/*/resources/*.resources.json
20-
providers/*/resources/*.manifest.json
2120
providers/mock_coordinator.go
2221
providers/mock_plugin_interface.go
2322
providers/mock_schema.go

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ make mql/generate
3030
# Generate specific provider resources (fast - recommended)
3131
# (if the mqlr binary is not there:)
3232
make providers/mqlr
33-
./mqlr generate providers/aws/resources/aws.lr --docs-file providers/aws/resources/aws.lr.manifest.yaml --dist providers/aws/resources
33+
./mqlr generate providers/aws/resources/aws.lr --dist providers/aws/resources
3434
```
3535

3636
### Step 3: Implementation Strategies
@@ -268,7 +268,7 @@ Think of it as: MQL (like SQL or even better GraphQL) → MQLC (compiler) → LL
268268
- Resource structs
269269
- Schema definitions
270270
- Data accessor methods
271-
- Generated files: `*.lr.go`, `*.lr.manifest.yaml`, `*.resources.json`
271+
- Generated files: `*.lr.go`, `*.lr.versions`, `*.resources.json`
272272
273273
### Resource Caching & __id
274274
**How caching works:**
@@ -313,7 +313,7 @@ But this also works:
313313
2. Run code generation:
314314
```bash
315315
make providers/mqlr # if mqlr is not already available
316-
./mqlr generate providers/aws/resources/aws.lr --docs-file providers/aws/resources/aws.lr.manifest.yaml --dist providers/aws/resources
316+
./mqlr generate providers/aws/resources/aws.lr --dist providers/aws/resources
317317
```
318318
3. Implement the resource methods in Go
319319
4. Rebuild and install the provider:
@@ -402,7 +402,7 @@ for {
402402
- Place fields split into multiple properties: name, address, latitude, longitude, google_place_id
403403
- Use JavaScript number types for numeric fields, not strings
404404
- Prefer typed resource references over raw ID strings. Instead of a `vpcId string` field, define a `vpc aws.vpc` field that returns the actual resource. This enables MQL traversal (e.g., `aws.ec2.instance.vpc.cidrBlock`) instead of requiring users to manually look up IDs.
405-
- In `.lr.manifest.yaml`, new fields only need `min_mondoo_version` if the resource itself has an older `min_mondoo_version`. If the resource already requires a recent enough version, fields inherit it implicitly.
405+
- Every resource and field has an explicit entry in `.lr.versions`. When a new field is added to an `.lr` file that isn't yet tracked, the `versions` command automatically assigns it the next patch version (current provider version + 1 patch). Existing entries are never overwritten.
406406
- **Match SDK types faithfully:** If an SDK field is `*bool`, use `bool` in `.lr` and `llx.BoolDataPtr()` in Go — don't cast it to `string`. If an SDK enum has only two states (Enabled/Disabled), prefer `bool`. Use `*type` intermediate variables with `llx.*DataPtr` helpers to preserve nil semantics.
407407
- **Consistency with existing fields:** Before adding new fields to a resource, check how its existing fields handle pointers, nil checks, and type conversions. Follow the same pattern.
408408
- **Verify enum values in `.lr` comments:** When listing possible values in field comments, check the SDK/API docs for completeness — don't assume the set is closed.

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ outlined above.
6262
If you make update to a provider's lr file, you can generate go files for that provider with this command:
6363
```bash
6464
make providers/mqlr
65-
./mqlr generate providers/aws/resources/aws.lr --docs-file providers/aws/resources/aws.lr.manifest.yaml --dist providers/aws/resources
65+
./mqlr generate providers/aws/resources/aws.lr --dist providers/aws/resources
6666
```
6767
To quickly install the changed provider plugin run `make providers/build/aws && make providers/install/aws`.
6868

Makefile

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ define buildProvider
8282
$(eval $@_BIN = "${$@_DIST}"/"${$@_NAME}")
8383
echo "--> [${$@_NAME}] process resources"
8484
./lr go ${$@_HOME}/resources/${$@_NAME}.lr --dist ${$@_DIST}
85-
./lr docs yaml ${$@_HOME}/resources/${$@_NAME}.lr --docs-file ${$@_HOME}/resources/${$@_NAME}.lr.manifest.yaml
86-
./lr docs json ${$@_HOME}/resources/${$@_NAME}.lr.manifest.yaml
85+
./lr versions ${$@_HOME}/resources/${$@_NAME}.lr
8786
echo "--> [${$@_NAME}] generate CLI json"
8887
cd ${$@_HOME} && go run ./gen/main.go .
8988
@if [ "$(SKIP_COMPILE)" = "yes" ]; then \
@@ -102,8 +101,7 @@ define buildProviderDist
102101
$(eval $@_BIN = "${$@_DIST}"/"${$@_NAME}")
103102
echo "--> [${$@_NAME}] process resources"
104103
./lr go ${$@_HOME}/resources/${$@_NAME}.lr --dist ${$@_DIST}
105-
./lr docs yaml ${$@_HOME}/resources/${$@_NAME}.lr --docs-file ${$@_HOME}/resources/${$@_NAME}.lr.manifest.yaml
106-
./lr docs json ${$@_HOME}/resources/${$@_NAME}.lr.manifest.yaml
104+
./lr versions ${$@_HOME}/resources/${$@_NAME}.lr
107105
echo "--> [${$@_NAME}] generate CLI json"
108106
cd ${$@_HOME} && go run ./gen/main.go .
109107
echo "--> [${$@_NAME}] creating ${$@_BIN}"
@@ -521,157 +519,126 @@ lr/docs/markdown: providers/lr
521519
./lr markdown providers/ansible/resources/ansible.lr \
522520
--pack-name "Ansible" \
523521
--description "The Ansible resource pack lets you use MQL to query and assess the security of your Ansible playbooks." \
524-
--docs-file providers/ansible/resources/ansible.lr.manifest.yaml \
525522
--output ../docs/docs/mql/resources/ansible-pack
526523
./lr markdown providers/arista/resources/arista.lr \
527524
--pack-name "Arista EOS" \
528525
--description "The Arista EOS resource pack lets you use MQL to query and assess the security of your Arista EOS network devices." \
529-
--docs-file providers/arista/resources/arista.lr.manifest.yaml \
530526
--output ../docs/docs/mql/resources/arista-pack
531527
./lr markdown providers/atlassian/resources/atlassian.lr \
532528
--pack-name "Atlassian" \
533529
--description "The Atlassian resource pack lets you use MQL to query and assess the security of your Atlassian services." \
534-
--docs-file providers/atlassian/resources/atlassian.lr.manifest.yaml \
535530
--output ../docs/docs/mql/resources/atlassian-pack
536531
./lr markdown providers/aws/resources/aws.lr \
537532
--pack-name "Amazon Web Services (AWS)" \
538533
--description "The Amazon Web Services (AWS) resource pack lets you use MQL to query and assess the security of your AWS cloud services." \
539-
--docs-file providers/aws/resources/aws.lr.manifest.yaml \
540534
--output ../docs/docs/mql/resources/aws-pack
541535
./lr markdown providers/azure/resources/azure.lr \
542536
--pack-name "Azure" \
543537
--description "The Azure resource pack lets you use MQL to query and assess the security of your Azure cloud services." \
544-
--docs-file providers/azure/resources/azure.lr.manifest.yaml \
545538
--output ../docs/docs/mql/resources/azure-pack
546539
./lr markdown providers/cloudflare/resources/cloudflare.lr \
547540
--pack-name "Cloudflare" \
548541
--description "The Cloudflare resource pack lets you use MQL to query and assess the security of your Cloudflare configuration." \
549-
--docs-file providers/cloudflare/resources/cloudflare.lr.manifest.yaml \
550542
--output ../docs/docs/mql/resources/cloudflare-pack
551543
./lr markdown providers/cloudformation/resources/cloudformation.lr \
552544
--pack-name "AWS CloudFormation" \
553545
--description "The AWS CloudFormation resource pack lets you use MQL to query and assess the security of your AWS CloudFormation." \
554-
--docs-file providers/cloudformation/resources/cloudformation.lr.manifest.yaml \
555546
--output ../docs/docs/mql/resources/cloudformation-pack
556547
./lr markdown providers/core/resources/core.lr \
557548
--pack-name "Core" \
558549
--description "The Core pack provides basic MQL resources that let you query and assess the security of assets in your infrastructure." \
559-
--docs-file providers/core/resources/core.lr.manifest.yaml \
560550
--output ../docs/docs/mql/resources/core-pack
561551
./lr markdown providers/equinix/resources/equinix.lr \
562552
--pack-name "Equinix Metal" \
563553
--description "The Equinix Metal resource pack lets you use MQL to query and assess the security of your Equinix Metal assets." \
564-
--docs-file providers/equinix/resources/equinix.lr.manifest.yaml \
565554
--output ../docs/docs/mql/resources/equinix-pack
566555
./lr markdown providers/gcp/resources/gcp.lr \
567556
--pack-name "Google Cloud Platform (GCP)" \
568557
--description "The Google Cloud Platform (GCP) resource pack lets you use MQL to query and assess the security of your Google cloud services." \
569-
--docs-file providers/gcp/resources/gcp.lr.manifest.yaml \
570558
--output ../docs/docs/mql/resources/gcp-pack
571559
./lr markdown providers/github/resources/github.lr \
572560
--pack-name "GitHub" \
573561
--description "The GitHub resource pack lets you use MQL to query and assess the security of your GitHub organizations and repositories." \
574-
--docs-file providers/github/resources/github.lr.manifest.yaml \
575562
--output ../docs/docs/mql/resources/github-pack
576563
./lr markdown providers/gitlab/resources/gitlab.lr \
577564
--pack-name "GitLab" \
578565
--description "The GitLab resource pack lets you use MQL to query and assess the security of your GitLab groups and projects." \
579-
--docs-file providers/gitlab/resources/gitlab.lr.manifest.yaml \
580566
--output ../docs/docs/mql/resources/gitlab-pack
581567
./lr markdown providers/google-workspace/resources/google-workspace.lr \
582568
--pack-name "Google Workspace" \
583569
--description "The Google Workspace resource pack lets you use MQL to query and assess the security of your Google Workspace identities and configuration." \
584-
--docs-file providers/google-workspace/resources/google-workspace.lr.manifest.yaml \
585570
--output ../docs/docs/mql/resources/google-workspace-pack
586571
./lr markdown providers/ipmi/resources/ipmi.lr \
587572
--pack-name "IPMI" \
588573
--description "The IPMI resource pack lets you use MQL to query and assess the security of your IPMI devices." \
589-
--docs-file providers/ipmi/resources/ipmi.lr.manifest.yaml \
590574
--output ../docs/docs/mql/resources/ipmi-pack
591575
./lr markdown providers/ipinfo/resources/ipinfo.lr \
592576
--pack-name "IPinfo" \
593577
--description "The IPinfo resource pack lets you use MQL to query IP address information from ipinfo.io." \
594-
--docs-file providers/ipinfo/resources/ipinfo.lr.manifest.yaml \
595578
--output ../docs/docs/mql/resources/ipinfo-pack
596579
./lr markdown providers/k8s/resources/k8s.lr \
597580
--pack-name "Kubernetes (K8s)" \
598581
--description "The Kubernetes resource pack lets you use MQL to query and assess the security of your Kubernetes clusters and workloads." \
599-
--docs-file providers/k8s/resources/k8s.lr.manifest.yaml \
600582
--output ../docs/docs/mql/resources/k8s-pack
601583
./lr markdown providers/mondoo/resources/mondoo.lr \
602584
--pack-name "Mondoo Platform" \
603585
--description "The Mondoo resource pack lets you interact with Mondoo Platform and its assets and resources." \
604-
--docs-file providers/mondoo/resources/mondoo.lr.manifest.yaml \
605586
--output ../docs/docs/mql/resources/mondoo-pack
606587
./lr markdown providers/ms365/resources/ms365.lr \
607588
--pack-name "Microsoft 365 (M365)" \
608589
--description "The Microsoft 365 (M365) resource pack lets you use MQL to query and assess the security of your Microsoft 365 identities and configuration." \
609-
--docs-file providers/ms365/resources/ms365.lr.manifest.yaml \
610590
--output ../docs/docs/mql/resources/m365-pack
611591
./lr markdown providers/network/resources/network.lr \
612592
--pack-name "Network" \
613593
--description "The Network resource pack lets you use MQL to query and assess the security of domains and network services." \
614-
--docs-file providers/network/resources/network.lr.manifest.yaml \
615594
--output ../docs/docs/mql/resources/network-pack
616595
./lr markdown providers/nmap/resources/nmap.lr \
617596
--pack-name "Nmap" \
618597
--description "The Nmap resource pack lets you use MQL to query and assess the network devices with Nmap." \
619-
--docs-file providers/nmap/resources/nmap.lr.manifest.yaml \
620598
--output ../docs/docs/mql/resources/nmap-pack
621599
./lr markdown providers/oci/resources/oci.lr \
622600
--pack-name "Oracle Cloud Infrastructure (OCI)" \
623601
--description "The Oracle Cloud Infrastructure (OCI) resource pack lets you use MQL to query and assess the security of your OCI services." \
624-
--docs-file providers/oci/resources/oci.lr.manifest.yaml \
625602
--output ../docs/docs/mql/resources/oci-pack
626603
./lr markdown providers/okta/resources/okta.lr \
627604
--pack-name "Okta" \
628605
--description "The Okta resource pack lets you use MQL to query and assess the security of your Okta identities and configuration." \
629-
--docs-file providers/okta/resources/okta.lr.manifest.yaml \
630606
--output ../docs/docs/mql/resources/okta-pack
631607
./lr markdown providers/opcua/resources/opcua.lr \
632608
--pack-name "OPC UA" \
633609
--description "The OPC UA resource pack lets you use MQL to query and assess the security of your OPC UA assets." \
634-
--docs-file providers/opcua/resources/opcua.lr.manifest.yaml \
635610
--output ../docs/docs/mql/resources/opcua-pack
636611
./lr markdown providers/os/resources/os.lr \
637612
--pack-name "Operating Systems (OS)" \
638613
--description "The Operating Systems (OS) resource pack lets you use MQL to query and assess the security of your operating system packages and configuration." \
639-
--docs-file providers/os/resources/os.lr.manifest.yaml \
640614
--output ../docs/docs/mql/resources/os-pack
641615
./lr markdown providers/shodan/resources/shodan.lr \
642616
--pack-name "Shodan" \
643617
--description "The Shodan resource pack lets you use MQL to query and assess IP and DNS information via Shodan service." \
644-
--docs-file providers/shodan/resources/shodan.lr.manifest.yaml \
645618
--output ../docs/docs/mql/resources/shodan-pack
646619
./lr markdown providers/slack/resources/slack.lr \
647620
--pack-name "Slack" \
648621
--description "The Slack resource pack lets you use MQL to query and assess the security of your Slack identities and configuration." \
649-
--docs-file providers/slack/resources/slack.lr.manifest.yaml \
650622
--output ../docs/docs/mql/resources/slack-pack
651623
./lr markdown providers/snowflake/resources/snowflake.lr \
652624
--pack-name "Snowflake" \
653625
--description "The Snowflake resource pack lets you use MQL to query and assess the security of your Snowflake identities and configuration." \
654-
--docs-file providers/snowflake/resources/snowflake.lr.manifest.yaml \
655626
--output ../docs/docs/mql/resources/snowflake-pack
656627
./lr markdown providers/tailscale/resources/tailscale.lr \
657628
--pack-name "Tailscale" \
658629
--description "The Tailscale resource pack lets you use MQL to query devices, users, DNS nameservers, and more information about a Tailscale network." \
659-
--docs-file providers/tailscale/resources/tailscale.lr.manifest.yaml \
660630
--output ../docs/docs/mql/resources/tailscale-pack
661631
./lr markdown providers/terraform/resources/terraform.lr \
662632
--pack-name "Terraform IaC" \
663633
--description "The Terraform IaC resource pack lets you use MQL to query and assess the security of your Terraform HCL, plan, and state resources." \
664-
--docs-file providers/terraform/resources/terraform.lr.manifest.yaml \
665634
--output ../docs/docs/mql/resources/terraform-pack
666635
./lr markdown providers/vcd/resources/vcd.lr \
667636
--pack-name "VMware Cloud Director" \
668637
--description "The VMware Cloud Director resource pack lets you use MQL to query and assess the security of your VMware Cloud Director configuration." \
669-
--docs-file providers/vcd/resources/vcd.lr.manifest.yaml \
670638
--output ../docs/docs/mql/resources/vcd-pack
671639
./lr markdown providers/vsphere/resources/vsphere.lr \
672640
--pack-name "VMware vSphere" \
673641
--description "The VMware vSphere resource pack lets you use MQL to query and assess the security of your VMware vSphere hosts and services." \
674-
--docs-file providers/vsphere/resources/vsphere.lr.manifest.yaml \
675642
--output ../docs/docs/mql/resources/vsphere-pack
676643

677644
lr/docs/stats:

0 commit comments

Comments
 (0)