Skip to content

Commit

Permalink
docs: update Bearer cloud (#1146)
Browse files Browse the repository at this point in the history
* docs: Go deeper on Bearer Cloud

- Add more reference to Bearer Cloud as a free self-service plan is about to launch
- Add a new liquid variable to create warning, info and error callout block

* Synthax

* Update Bearer cloud link to send to the doc first

* Update docs/guides/bearer-cloud.md

Co-authored-by: elsapet <elizabeth@bearer.sh>

---------

Co-authored-by: elsapet <elizabeth@bearer.sh>
  • Loading branch information
gmontard and elsapet authored Jul 27, 2023
1 parent 6c36304 commit c0ef4e5
Show file tree
Hide file tree
Showing 9 changed files with 4,081 additions and 1,017 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![Discord](https://img.shields.io/discord/1042147477765242973?label=discord)][discord]

☁️ Ready to take the next step? [Learn more about Bearer Cloud](https://www.bearer.com/bearer-cloud). ☁️
☁️ Ready to take the next step? [Learn more about Bearer Cloud](https://docs.bearer.com/guides/bearer-cloud/). ☁️
</div>

## Developer friendly static code analysis for security and privacy
Expand Down Expand Up @@ -48,7 +48,7 @@ Bearer CLI scans your source code for:
* Data Protection Impact Assessment (DPIA).
* Records of Processing Activities (RoPA) input for GDPR compliance reporting.

Bearer CLI also powers our SaaS solution, [Bearer Cloud](https://www.bearer.com/bearer-cloud), allowing security teams to scale and monitor their application security program using the same engine.
Bearer CLI also powers our SaaS solution, [Bearer Cloud](https://docs.bearer.com/guides/bearer-cloud/), allowing security teams to scale and monitor their application security program using the same engine.

## :rocket: Getting started

Expand Down
27 changes: 26 additions & 1 deletion docs/.eleventy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");

const {
EleventyHtmlBasePlugin,
EleventyRenderPlugin,
} = require("@11ty/eleventy");

const yaml = require("js-yaml");
const markdownIt = require("markdown-it");
const markdownItEmoji = require("markdown-it-emoji");
Expand Down Expand Up @@ -33,6 +35,9 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({
"./_src/styles/prism-theme.css": "./prism-theme.css",
});
eleventyConfig.addPassthroughCopy({
"./_src/styles/callout.css": "./callout.css",
});
eleventyConfig.addPassthroughCopy({ "./_src/js/app.js": "./app.js" });
eleventyConfig.addPassthroughCopy({
"./_src/js/rule-search.js": "./rule-search.js",
Expand All @@ -51,7 +56,7 @@ module.exports = function (eleventyConfig) {

eleventyConfig.addPlugin(EleventyRenderPlugin);
eleventyConfig.addPlugin(syntaxHighlight);

// mermaid rendering
eleventyConfig.addPlugin(mermaid, {
themeVariables: {
Expand Down Expand Up @@ -151,6 +156,26 @@ module.exports = function (eleventyConfig) {
return false;
}
});

eleventyConfig.addPairedShortcode("callout", function(content, level = "", format = "html", customLabel = "") {
if( format === "md" ) {
content = mdIt.renderInline(content);
} else if( format === "md-block" ) {
content = mdIt.render(content);
}
let label = "";
if(customLabel) {
label = customLabel;
} else if(level === "info" || level === "error") {
label = level.toUpperCase();
} else if(level === "warn") {
label = "WARNING"
}
let labelHtml = label ? `<div class="elv-callout-label">${customLabel || label}</div>` : "";
let contentHtml = (content || "").trim().length > 0 ? `<div class="elv-callout-c">${content}</div>` : "";

return `<div class="elv-callout${level ? ` elv-callout-${level}` : ""}">${labelHtml}${contentHtml}</div>`;
});

return {
dir: {
Expand Down
1 change: 1 addition & 0 deletions docs/_src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<link rel="icon" href="/assets/img/favicon.svg"/>
<link rel="stylesheet" href="/style.css?v={% version %}"/>
<link rel="stylesheet" href="/prism-theme.css"/>
<link rel="stylesheet" href="/callout.css"/>
<script defer data-domain="docs.bearer.com" src="https://plausible.io/js/script.js"></script>
</head>
<body class="bg-white dark:bg-neutral-600">
Expand Down
234 changes: 234 additions & 0 deletions docs/_src/styles/callout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
/* Warning */
.elv-callout {
--callout-primary: hsl(209, 100%, 60%);
--callout-secondary: hsl(209, 100%, 90%);
--callout-primarytext: #000;
line-height: 1.5;
margin-left: 0rem;
margin-right: 0rem;
margin-bottom: 2em;
background-color: var(--callout-secondary);
border: 3px solid var(--callout-border, var(--callout-primary));
}
details .elv-callout {
margin-left: 0;
margin-right: 0;
}
[role="tabpanel"] > .elv-callout:last-child {
margin-bottom: 0;
}
.elv-callout-box {
--callout-primary: #dff7ff;
--callout-primarytext: #000;
--callout-secondary: #f2fcff;
}
@media (min-width: 64em) { /* 1024px */
.elv-callout {
border-radius: 0.3em;
}
}
.dark {
.elv-callout {
--callout-primary: hsl(195, 100%, 22%);
--callout-secondary: hsl(195, 100%, 12%);
--callout-primarytext: #fff;
}
.elv-callout,
.elv-callout a {
color: #fff;
}
}
table .elv-callout {
margin-left: 0;
margin-right: 0;
margin-bottom: 1em;
}

.elv-callout-c {
padding: 0.75em 1em; /* 12px 16px /16 */
}

.elv-callout-c > p:first-child {
margin-top: 0;
}
.elv-callout-c > p:last-child {
margin-bottom: 0;
}

.elv-callout {
display: flex;
flex-direction: column;
}

.elv-callout-demo {
position: relative;
}
.elv-callout-label {
align-self: flex-start;
font-size: 0.9375em; /* 15px /16 */
font-weight: 600;
}
.elv-callout-label,
.elv-callout-demo:before,
.elv-callout-demo:after {
margin: 0;
margin-right: .5em;
border-radius: 0 0 .3em 0;
align-items: center;
padding: 0 0.55em;
}
.elv-callout-demo:before,
.elv-callout-demo:after {
display: inline-flex;
position: absolute;
left: 0;
top: 0;
font-size: 0.8125em; /* 13px /16 */
font-weight: 800;
}
.elv-callout-label,
.elv-callout-demo:before,
.elv-callout:not(.elv-callout-demo) :not(pre) > code {
background-color: var(--callout-tag, var(--callout-primary));
color: var(--callout-primarytext);
}
.elv-callout a,
.elv-callout :visited {
color: var(--callout-primarytext);
}
.elv-callout pre {
margin-top: 1em;
margin-bottom: 1em;
}

.elv-callout-label {
font-weight: 700;
}
.elv-callout-label:first-child:last-child {
font-size: 1.2em;
background-color: transparent;
}

/* Error */
.elv-callout-error {
--callout-primary: hsl(0, 100%, 77%);
--callout-secondary: hsl(0, 100%, 90%);
}
.dark {
.elv-callout-error {
--callout-primary: hsl(0, 100%, 22%);
--callout-secondary: hsl(0, 100%, 12%);
}
}
/* Warning */
.elv-callout-warn {
--callout-primary: hsl(36, 100%, 62%);
--callout-secondary: hsl(36, 100%, 85%);
}
.dark {
.elv-callout-warn {
--callout-primary: hsl(36, 100%, 29%);
--callout-secondary: hsl(36, 100%, 13%);
}
}
/* Demo */
.elv-callout-demo {
--callout-primary: transparent;
--callout-secondary: hsl(270deg 50% 90%);
--callout-tag: rebeccapurple;
--callout-border: rebeccapurple;
overflow: hidden;
padding-left: 3.888888888889em; /* 70px /18 */
}
.dark {
.elv-callout-demo {
--callout-primary: hsl(270deg 50% 30%);
--callout-secondary: hsl(270deg 50% 30%);
--callout-tag: hsl(270deg 50% 85%);
--callout-primarytext: #fff;
--callout-border: rebeccapurple;
}
.elv-callout-demo code {
background-color: hsl(270deg 50% 15%);
}
}
.elv-callout-demo:after {
display: none;
}
@media (min-width: 37.5em) { /* 600px */
.elv-callout-demo {
padding-right: 3.888888888889em; /* 70px /18 */
}
.elv-callout-demo:after {
display: block;
}
}
.elv-callout-demo:before,
.elv-callout-demo:after {
content: "DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO ";
width: min-content;
overflow: hidden;
top: -2em;
bottom: -1em;
border-radius: 0;
background-color: var(--callout-primary);
color: var(--callout-tag);
font-weight: 700;
transform: skewY(-13deg);
padding: 0 0.2857142857143em; /* 4px /14 */
margin: 0;
}
.elv-callout-demo:after {
right: 0;
left: auto;
margin-right: 0;
margin-left: .5em;
transform: skewY(13deg);
}

/* Style the content inside of the callout */
.elv-callout > :first-child {
margin-top: 0;
}
.elv-callout > :last-child {
margin-bottom: 0;
}

/* Sticky callout is for legacy docs versions */
body > .elv-callout-sticky .elv-callout-label {
display: none;
}
@media (min-width: 37.5em) and (min-height: 25em) { /* 600px / 400px */
body > .elv-callout-sticky {
position: sticky;
top: 0;
z-index: 2;
box-shadow: 0 3px 0 0 rgba(0,0,0,.08);
}
body > .elv-callout-sticky .elv-callout {
margin: 0;
}
}

/* in left nav */
@media (max-width: 63.9375em) { /* 1023px */
.elv-toc .elv-callout {
border-left: 0;
border-right: 0;
}
}
@media (min-width: 64em) { /* 1024px */
.elv-toc .elv-callout {
margin-right: 0;
margin-left: -1rem;
font-size: 0.9375em; /* 15px /16 */
line-height: 2;
}
}
@media (min-width: 64em) and (max-width: 76.875em) { /* 1024px–1230px */
.elv-toc .elv-callout {
border-left: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
2 changes: 2 additions & 0 deletions docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ layout: "layouts/doc"
permalink: "/"
---

{% callout "info" %}🎉 Bearer Cloud is available now for free for everyone, <a href="/guides/bearer-cloud">learn more</a>.{% endcallout %}

# Bearer CLI

Welcome to the Bearer CLI documentation. Bearer CLI is a static application security testing (SAST) tool that scans your source code and analyzes your data flows to discover, filter and prioritize security and privacy risks.
Expand Down
33 changes: 29 additions & 4 deletions docs/guides/bearer-cloud.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
---
title: Connect to Bearer Cloud
templateEngineOverride: md
---

# Connect to Bearer Cloud
# Bearer Cloud

If you're looking to manage product and application code security at scale, Bearer Cloud offers a platform for teams that syncs with Bearer CLI's output.

<iframe class="w-full aspect-video" src="https://youtube.com/embed/whPRe9GaY7w" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

[Learn more about Bearer Cloud](https://www.bearer.com/bearer-cloud).

# Create an account

You can [start creating your free account](https://my.bearer.sh/users/sign_up) right now using your GitHub, GitLab, or Google SSO.

{% callout "info" %}
Bearer Cloud free plan comes with these limits:<br/>
- 1 team member<br/>
- 10 applications<br/>
- Slack integration only<br/>

Need more? <a href="https://www.bearer.com/contact">Contact us</a>.
{% endcallout %}


# Get started with Bearer Cloud

If you're looking to manage product and application code security at scale, Bearer Cloud offers at platform for teams that syncs with Bearer CLI's output. [Learn more about Bearer Cloud](https://www.bearer.com/bearer-cloud).

## Generate an API token

Expand Down Expand Up @@ -75,4 +95,9 @@ Bearer Cloud automatically captures any scans run with a valid `api-key`. Subseq

## Make the most of Bearer CLI

Looking for more ways to make the most of Bearer CLI? Browse the guides to learn how to [Configure a scan](/guides/configure-scan/), [create a custom rule](/guides/custom-rule), or [run a privacy report](/guides/privacy/).
Looking for more ways to make the most of Bearer CLI? Browse the guides to learn how to [Configure a scan](/guides/configure-scan/), [create a custom rule](/guides/custom-rule), or [run a privacy report](/guides/privacy/).


## Need help?

Get in touch with our team directly on [Discord](https://discord.com/invite/eaHZBJUXRF) or [book a demo](https://www.bearer.com/demo) with one of our engineer.
Loading

0 comments on commit c0ef4e5

Please sign in to comment.