Skip to content

Commit 12b6ef7

Browse files
github-automation-metabaseMetabase Docs bot
andauthored
[auto] adding content to git-hook-token-scanner->master (#282)
Co-authored-by: Metabase Docs bot <[email protected]>
1 parent 0438045 commit 12b6ef7

File tree

71 files changed

+5390
-269
lines changed

Some content is hidden

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

71 files changed

+5390
-269
lines changed

_docs/master/databases/connections/bigquery.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,6 @@ If you're having trouble with your BigQuery connection, you can check out this [
168168

169169
There aren't (yet) any model features available for BigQuery.
170170

171-
## Database routing
172-
173-
Database routing for BigQuery works between BigQuery **projects** with identical schemas.
174-
175-
See [Database routing](../../permissions/database-routing).
176-
177171
## Danger zone
178172

179173
See [Danger zone](../danger-zone).

_docs/master/databases/connections/mongodb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Learn more about [configuring SSL with MongoDB](http://mongodb.github.io/mongo-j
121121

122122
## How Metabase syncs data in MongoDB
123123

124-
Because MongoDB contains unstructured data, Metabase takes a different approach to syncing your database's metadata. To get a sense of the schema, Metabase will query the first and last 500 documents (most of the calculation is done in MongoDB). This sampling helps Metabase do things like differentiate datetime fields from string fields, and provide people with pre-populated filters. Metabase also syncs 1,000 leaf fields (fields at the deepest nesting level) per MongoDB collection. The reason Metabase only scans a sample of the documents is because scanning every document in every collection on every sync would put too much strain on your database. And while the sampling does a pretty good job keeping Metabase up to date, it can also mean that new fields can sometimes fall through the cracks, leading to visualization issues, or even fields failing to appear in your results. For more info, check out our [troubleshooting guide](../../troubleshooting-guide/db-connection).
124+
Because MongoDB contains unstructured data, Metabase takes a different approach to syncing your database's metadata. To get a sense of the schema, Metabase will query the first and last 500 documents (most of the calculation is done in MongoDB). This sampling helps Metabase do things like differentiate datetime fields from string fields, and provide people with pre-populated filters. The reason Metabase only scans a sample of the documents is because scanning every document in every collection on every sync would put too much strain on your database. And while the sampling does a pretty good job keeping Metabase up to date, it can also mean that new fields can sometimes fall through the cracks, leading to visualization issues, or even fields failing to appear in your results. For more info, check out our [troubleshooting guide](../../troubleshooting-guide/db-connection).
125125

126126
## General connectivity concerns
127127

_docs/master/developers-guide/community-drivers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Anyone can build a community driver. These are the currently known third-party d
3737
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
3838
| [CSV](https://github.com/Markenson/csv-metabase-driver) | ![GitHub stars](https://img.shields.io/github/stars/Markenson/csv-metabase-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Markenson/csv-metabase-driver) |
3939
| [Databend](https://github.com/databendcloud/metabase-databend-driver) | ![GitHub stars](https://img.shields.io/github/stars/databendcloud/metabase-databend-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/databendcloud/metabase-databend-driver) |
40-
| [DB2](https://github.com/damienchambe/metabase-db2-driver) | ![GitHub stars](https://img.shields.io/github/stars/damienchambe/metabase-db2-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/damienchambe/metabase-db2-driver) |
40+
| [DB2](https://github.com/damienchambe/metabase-db2-driver) | ![GitHub stars](https://img.shields.io/github/stars/damienchambe/metabase-db2-driver) | ![Github (Pre-)Release Date](https://img.shields.io/github/release-date-pre/damienchambe/metabase-db2-driver) |
4141
| [Dremio](https://github.com/Baoqi/metabase-dremio-driver) | ![GitHub stars](https://img.shields.io/github/stars/Baoqi/metabase-dremio-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Baoqi/metabase-dremio-driver) |
4242
| [DuckDB](https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver) | ![GitHub stars](https://img.shields.io/github/stars/MotherDuck-Open-Source/metabase_duckdb_driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/MotherDuck-Open-Source/metabase_duckdb_driver) |
4343
| [Firebolt](https://github.com/firebolt-db/metabase-firebolt-driver) | ![GitHub stars](https://img.shields.io/github/stars/firebolt-db/metabase-firebolt-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/firebolt-db/metabase-firebolt-driver) |

_docs/master/developers-guide/devenv.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ yarn dev
2828

2929
This runs both the [frontend](#frontend) and [backend](#backend). Alternatively, you can run them separately in two terminal sessions below.
3030

31-
To use any other database beside the default ones please take a look at [Building Drivers](#building-drivers) further down in this document.
32-
3331
### Frontend
3432

3533
Metabase depends on third-party libraries to run, so you'll need to keep those up to date. The Clojure CLI will automatically fetch the dependencies when needed. With JavaScript dependencies, however, you'll need to kick off the installation process manually.

_docs/master/developers-guide/driver-changelog.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ layout: new-docs
2727
replace existing keys like `:alias`, `:join-alias`, or `:name`; make sure you use `driver-api/qp.add.alias`,
2828
`driver-api/qp.add.source-table`, and `driver-api/qp.add.source-alias` respectively.
2929

30-
- Added the driver multi-method `driver/extra-info` for drivers to provide info such as db routing configuration details
31-
from their `metabase-plugin.yaml` file.
32-
3330
- Extend `datetime()` to accept UTF-8 encoded binary and numbers (unix timestamps) in addition to strings.
3431

3532
- Added a feature `:expressions/today` for drivers that support generating a date for the current day.
@@ -61,6 +58,7 @@ layout: new-docs
6158
`metabase.driver/upload-type->database-type` or `metabase.driver/allowed-promotions` -- make sure you use
6259
`:metabase.upload/varchar-255` rather than something like `::upload/varchar-255`.
6360

61+
- Added the multi-method `metabase.driver.sql.parameters.substitution/time-grouping->replacement-snippet-info`. This is effectively `->replacement-snippet-info` for the new native query time grouping feature, but is its own separate multimethod because it needs an extra parameter.
6462
- The `metabase.models.secret` namespace has been replaced with `metabase.secrets.core`; if you were using it please
6563
update your usages.
6664

_docs/master/developers-guide/frontend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ function getFoo(a, b, c) {
266266
}
267267
```
268268

269-
- Be conservative with what comments you add to the codebase. Comments shouldn't be used as reminders or as todos--record those by creating a new issue in GitHub. Ideally, code should be written in such a way that it explains itself clearly. When it does not, you should first try rewriting the code. If for whatever reason you are unable to write something clearly, add a comment to explain the "why".
269+
- Be conservative with what comments you add to the codebase. Comments shouldn't be used as reminders or as todos--record those by creating a new issue in Github. Ideally, code should be written in such a way that it explains itself clearly. When it does not, you should first try rewriting the code. If for whatever reason you are unable to write something clearly, add a comment to explain the "why".
270270

271271
```javascript
272272

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
version: master
3+
has_magic_breadcrumbs: true
4+
show_category_breadcrumb: true
5+
show_title_breadcrumb: true
6+
category: 'Developers Guide'
7+
title: 'Security Token Scanner'
8+
source_url: 'https://github.com/metabase/metabase/blob/master/docs/developers-guide/security-token-scanner.md'
9+
layout: new-docs
10+
---
11+
12+
# Security Token Scanner
13+
14+
Security token scanner detects potentially leaked API keys and secrets in the Metabase codebase. Runs automatically as a git precommit hook on staged files.
15+
16+
## Usage
17+
18+
```bash
19+
# Scan specific files
20+
./bin/mage -token-scan deps.edn bb.edn
21+
22+
# Scan all files
23+
./bin/mage -token-scan -a
24+
25+
# Verbose output
26+
./bin/mage -token-scan -v deps.edn
27+
```
28+
29+
## Token Types Detected
30+
31+
- Airgap tokens (`airgap_`)
32+
- Dev tokens (`mb_dev_`, 64-char hex)
33+
- OpenAI API keys (`sk-`)
34+
- JWT/JWE tokens
35+
- GitHub tokens (`gh[pousr]_`)
36+
- Slack bot tokens (`xoxb-`)
37+
- AWS access keys (`AKIA`)
38+
39+
The scanner uses `.gitignore` to filter files and will block commits containing detected tokens.
40+
41+
42+
## False positives
43+
44+
If the scanner flags a non-token string, you should **exclude the literal token string** by adding it to: `mage/resources/token_scanner/token_whitelist.txt`.
45+
46+
```
47+
echo 'my-token-string' >> mage/resources/token_scanner/token_whitelist.txt && git add mage/resources/token_scanner/token_whitelist.txt
48+
```
49+
50+
51+
## Bypassing (not recommended)
52+
53+
```bash
54+
git commit --no-verify -m "commit message"
55+
```

_docs/master/developers-guide/versioning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ E.g.,
6868

6969
## Further reading
7070

71-
- [Metabase releases on GitHub](https://github.com/metabase/metabase/releases)
71+
- [Metabase releases on Github](https://github.com/metabase/metabase/releases)
7272
- [Metabase release blog posts](/releases)

_docs/master/embedding/sdk/api/BaseInteractiveQuestionProps.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

_docs/master/embedding/sdk/api/CreateQuestion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5 id="issaveenabled"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">isSaveEnabled</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>Whether to show the save button.</p>
1515
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5 id="onbeforesave"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">onBeforeSave</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">question</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a href="MetabaseQuestion.html" class="tsd-signature-type tsd-kind-interface">MetabaseQuestion</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">isNewQuestion</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><p>A callback function that triggers before saving. Only relevant when <code>isSaveEnabled = true</code></p>
1616
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5 id="onrun"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">onRun</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">question</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a href="MetabaseQuestion.html" class="tsd-signature-type tsd-kind-interface">MetabaseQuestion</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></h5><div class="tsd-comment tsd-typography"><p>A callback function that triggers when a question is updated, including when a user clicks the <code>Visualize</code> button in the question editor</p>
17-
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5 id="onsave"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">onSave</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">question</span><span class="tsd-signature-symbol">:</span> <a href="MetabaseQuestion.html" class="tsd-signature-type tsd-kind-interface">MetabaseQuestion</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">dashboardTabId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">isNewQuestion</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></h5><div class="tsd-comment tsd-typography"><p>A callback function that triggers when a user saves the question. Only relevant when <code>isSaveEnabled = true</code></p>
17+
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5 id="onsave"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">onSave</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">question</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <a href="MetabaseQuestion.html" class="tsd-signature-type tsd-kind-interface">MetabaseQuestion</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">isNewQuestion</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></h5><div class="tsd-comment tsd-typography"><p>A callback function that triggers when a user saves the question. Only relevant when <code>isSaveEnabled = true</code></p>
1818
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5 id="plugins"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">plugins</span><span class="tsd-signature-symbol">?: </span><a href="MetabasePluginsConfig.html" class="tsd-signature-type tsd-kind-type-alias">MetabasePluginsConfig</a></h5></li><li class="tsd-parameter"><h5 id="targetcollection"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">targetCollection</span><span class="tsd-signature-symbol">?: </span><a href="SdkCollectionId.html" class="tsd-signature-type tsd-kind-type-alias">SdkCollectionId</a></h5><div class="tsd-comment tsd-typography"><p>The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.</p>
1919
</div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5 id="withdownloads"><code class="tsd-tag">Optional</code><span class="tsd-kind-property">withDownloads</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>Enables the ability to download results in the interactive question.</p>
2020
</div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0b728411cd1dfb4bd26992bb35a73cf8edaa22e7/types/react/jsx-runtime.d.ts#L6" class="tsd-signature-type external" target="_blank">Element</a></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-deprecated"><h4 class="tsd-anchor-link" id="deprecated">Deprecated<a href="#deprecated" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Use <code>&lt;InteractiveQuestion questionId=&quot;new&quot; /&gt;</code> instead.</p>

0 commit comments

Comments
 (0)