Skip to content

Commit f2dc96e

Browse files
authored
[Feat] implementation Notion analyzer (#3869)
### Description: Since `Notion.co` allows to enable [capabilities](https://developers.notion.com/reference/capabilities) against integration token, It is a good candidate to build an analyzer for it. ![Screenshot 2025-02-04 at 6 46 37 PM](https://github.com/user-attachments/assets/2fb711fe-466f-4b78-9b25-56852f08cd3b) This PR implements notion analyzer along with its integration test. ### Checklist: * [ ] Tests passing (`make test-community`)? * [x] Lint passing (`make lint` this requires [golangci-lint](https://golangci-lint.run/welcome/install/#local-installation))?
1 parent 0761334 commit f2dc96e

File tree

9 files changed

+643
-0
lines changed

9 files changed

+643
-0
lines changed

pkg/analyzer/analyzers/analyzers.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const (
8282
AnalyzerTypeStripe
8383
AnalyzerTypeTwilio
8484
AnalyzerTypePrivateKey
85+
AnalyzerTypeNotion
8586
// Add new items here with AnalyzerType prefix
8687
)
8788

@@ -110,6 +111,7 @@ var analyzerTypeStrings = map[AnalyzerType]string{
110111
AnalyzerTypeStripe: "Stripe",
111112
AnalyzerTypeTwilio: "Twilio",
112113
AnalyzerTypePrivateKey: "PrivateKey",
114+
AnalyzerTypeNotion: "Notion",
113115
// Add new mappings here
114116
}
115117

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"AnalyzerType":22,"Bindings":[{"Resource":{"Name":"hooman","FullyQualifiedName":"notion.so/bot/62faeec3-a948-4dd4-90ae-426e0b192902","Type":"bot","Metadata":{"workspace":"hoomanit"},"Parent":null},"Permission":{"Value":"insert_content","Parent":null}},{"Resource":{"Name":"hooman","FullyQualifiedName":"notion.so/bot/62faeec3-a948-4dd4-90ae-426e0b192902","Type":"bot","Metadata":{"workspace":"hoomanit"},"Parent":null},"Permission":{"Value":"read_content","Parent":null}},{"Resource":{"Name":"hooman","FullyQualifiedName":"notion.so/bot/62faeec3-a948-4dd4-90ae-426e0b192902","Type":"bot","Metadata":{"workspace":"hoomanit"},"Parent":null},"Permission":{"Value":"read_users_with_email","Parent":null}},{"Resource":{"Name":"hooman","FullyQualifiedName":"notion.so/bot/62faeec3-a948-4dd4-90ae-426e0b192902","Type":"bot","Metadata":{"workspace":"hoomanit"},"Parent":null},"Permission":{"Value":"update_content","Parent":null}}],"UnboundedResources":[{"Name":"hooman","FullyQualifiedName":"notion.so/person/3d0600fa-fa18-427d-8abc-58b662f0d209","Type":"person","Metadata":{"email":"[email protected]"},"Parent":null}],"Metadata":null}

0 commit comments

Comments
 (0)