mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
fix billing
This commit is contained in:
parent
f1cf299611
commit
f96460c0ce
2
.gitignore
vendored
2
.gitignore
vendored
@ -62,6 +62,6 @@ GoSDK/tester/
|
||||
|
||||
secret.env
|
||||
|
||||
*/.env
|
||||
/.env
|
||||
|
||||
config.env
|
1
Alert/.env
Normal file
1
Alert/.env
Normal file
@ -0,0 +1 @@
|
||||
ONEUPTIME_SECRET=iS5W9WIUMhS2ZDWL
|
@ -14,11 +14,11 @@ mobile_lighthouse_accounts:
|
||||
- sudo docker run --name mongo -p 27017:27017 -d mongo:4.2.3
|
||||
- sudo docker run --name redis -p 6379:6379 -d redis:7.0.3 redis-server
|
||||
- sudo docker build -t oneuptime/backend:5.0.$CI_PIPELINE_ID ./backend
|
||||
- sudo docker run --env-file ./backend/.env -e IS_SAAS_SERVICE=true --net=host -d oneuptime/backend:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run --env-file ./backend/.env -e BILLING_ENABLED=true --net=host -d oneuptime/backend:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker build -t oneuptime/accounts:5.0.$CI_PIPELINE_ID ./accounts
|
||||
- sudo docker run --env-file ./accounts/.env -e IS_SAAS_SERVICE=true -p 3003:3003 -d oneuptime/accounts:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run --env-file ./accounts/.env -e BILLING_ENABLED=true -p 3003:3003 -d oneuptime/accounts:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker build -t oneuptime/dashboard:5.0.$CI_PIPELINE_ID ./dashboard
|
||||
- sudo docker run --env-file ./dashboard/.env -e IS_SAAS_SERVICE=true -p 3000:3000 -d oneuptime/dashboard:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run --env-file ./dashboard/.env -e BILLING_ENABLED=true -p 3000:3000 -d oneuptime/dashboard:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker ps
|
||||
- npm install
|
||||
- cd accounts
|
||||
@ -52,11 +52,11 @@ desktop_lighthouse_accounts:
|
||||
- sudo docker run --name mongo -p 27017:27017 -d mongo:4.2.3
|
||||
- sudo docker run --name redis -p 6379:6379 -d redis:7.0.3 redis-server
|
||||
- sudo docker build -t oneuptime/backend:5.0.$CI_PIPELINE_ID ./backend
|
||||
- sudo docker run --env-file ./backend/.env -e IS_SAAS_SERVICE=true --net=host -d oneuptime/backend:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run --env-file ./backend/.env -e BILLING_ENABLED=true --net=host -d oneuptime/backend:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker build -t oneuptime/accounts:5.0.$CI_PIPELINE_ID ./accounts
|
||||
- sudo docker run --env-file ./accounts/.env -e IS_SAAS_SERVICE=true -p 3003:3003 -d oneuptime/accounts:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run --env-file ./accounts/.env -e BILLING_ENABLED=true -p 3003:3003 -d oneuptime/accounts:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker build -t oneuptime/dashboard:5.0.$CI_PIPELINE_ID ./dashboard
|
||||
- sudo docker run --env-file ./dashboard/.env -e IS_SAAS_SERVICE=true -p 3000:3000 -d oneuptime/dashboard:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run --env-file ./dashboard/.env -e BILLING_ENABLED=true -p 3000:3000 -d oneuptime/dashboard:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker ps
|
||||
- npm install
|
||||
- cd accounts
|
||||
|
@ -19,7 +19,7 @@ test_backend:
|
||||
- sudo docker run --name realtime --env-file ./realtime/.env -e PORT=3300 --net=host -d oneuptime/realtime:latest
|
||||
- sudo docker run --name=samlIdp -p 9876:8080 -p 8443:8443 -e SIMPLESAMLPHP_SP_ENTITY_ID=oneuptime.com -e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:3002/api/user/sso/callback -e SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp -v $PWD/saml/users.php:/var/www/simplesamlphp/config/authsources.php -d kristophjunge/test-saml-idp
|
||||
- sudo docker build -t oneuptime/InitScript:5.0.$CI_PIPELINE_ID ./InitScript
|
||||
- sudo docker run -e NODE_ENV=development -e IS_SAAS_SERVICE=true -e IS_TESTING=true --net=host -d oneuptime/InitScript:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run -e NODE_ENV=development -e BILLING_ENABLED=true -e IS_TESTING=true --net=host -d oneuptime/InitScript:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker build -t oneuptime/probe:5.0.$CI_PIPELINE_ID ./probe
|
||||
- sudo docker run --name probe-1 --env-file ./probe/.env -e PORT=3024 -e SERVER_URL=http://localhost:3020 -e PROBE_NAME='Probe 1' -e PROBE_KEY=test-key --net=host -d oneuptime/probe:5.0.$CI_PIPELINE_ID
|
||||
- sudo docker run --name probe-2 --env-file ./probe/.env -e PORT=3025 -e SERVER_URL=http://localhost:3020 -e PROBE_NAME='Probe 2' -e PROBE_KEY=test-key --net=host -d oneuptime/probe:5.0.$CI_PIPELINE_ID
|
||||
@ -30,7 +30,7 @@ test_backend:
|
||||
- sudo apt-get install -y nodejs
|
||||
- cd backend
|
||||
- npm install
|
||||
- ENCRYPTION_KEY=$ENCRYPTION_KEY TEST_EMAIL_SMTP_PORT=$TEST_EMAIL_SMTP_PORT TEST_EMAIL_SMTP_SERVER=$TEST_EMAIL_SMTP_SERVER TEST_EMAIL=$TEST_EMAIL TEST_EMAIL_NAME=$TEST_EMAIL TEST_EMAIL_PASSWORD=$TEST_EMAIL_PASSWORD IS_SAAS_SERVICE=true IS_TESTING=true DOCKER_UNMASKED_USERNAME=$DOCKER_UNMASKED_USERNAME DOCKER_UNMASKED_PASSWORD=$DOCKER_UNMASKED_PASSWORD DOCKER_SECURITY_SCAN_REGISTRY_URL=$DOCKER_SECURITY_SCAN_REGISTRY_URL DOCKER_SECURITY_SCAN_IMAGE_PATH=$DOCKER_SECURITY_SCAN_IMAGE_PATH DOCKER_SECURITY_SCAN_IMAGE_TAGS=$DOCKER_SECURITY_SCAN_IMAGE_TAGS GITHUB_UNMASKED_USERNAME=$GITHUB_UNMASKED_USERNAME GITHUB_UNMASKED_PASSWORD=$GITHUB_UNMASKED_PASSWORD GITHUB_SECURITY_SCAN_REPOSITORY_URL=$GITHUB_SECURITY_SCAN_REPOSITORY_URL npm test
|
||||
- ENCRYPTION_KEY=$ENCRYPTION_KEY TEST_EMAIL_SMTP_PORT=$TEST_EMAIL_SMTP_PORT TEST_EMAIL_SMTP_SERVER=$TEST_EMAIL_SMTP_SERVER TEST_EMAIL=$TEST_EMAIL TEST_EMAIL_NAME=$TEST_EMAIL TEST_EMAIL_PASSWORD=$TEST_EMAIL_PASSWORD BILLING_ENABLED=true IS_TESTING=true DOCKER_UNMASKED_USERNAME=$DOCKER_UNMASKED_USERNAME DOCKER_UNMASKED_PASSWORD=$DOCKER_UNMASKED_PASSWORD DOCKER_SECURITY_SCAN_REGISTRY_URL=$DOCKER_SECURITY_SCAN_REGISTRY_URL DOCKER_SECURITY_SCAN_IMAGE_PATH=$DOCKER_SECURITY_SCAN_IMAGE_PATH DOCKER_SECURITY_SCAN_IMAGE_TAGS=$DOCKER_SECURITY_SCAN_IMAGE_TAGS GITHUB_UNMASKED_USERNAME=$GITHUB_UNMASKED_USERNAME GITHUB_UNMASKED_PASSWORD=$GITHUB_UNMASKED_PASSWORD GITHUB_SECURITY_SCAN_REPOSITORY_URL=$GITHUB_SECURITY_SCAN_REPOSITORY_URL npm test
|
||||
- cd ..
|
||||
- chmod +x ./ci/scripts/storehash.sh
|
||||
- ./ci/scripts/storehash.sh test_backend backend InitScript probe HttpTestServer
|
||||
|
@ -8,7 +8,7 @@ e2e_docker_compose_test:
|
||||
- sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
- sudo chmod +x /usr/local/bin/docker-compose
|
||||
- sudo docker-compose down -v
|
||||
- export IS_SAAS_SERVICE=true
|
||||
- export BILLING_ENABLED=true
|
||||
# Install the cluster.
|
||||
- chmod +x ./env-setup.sh
|
||||
- ./env-setup.sh
|
||||
|
@ -1,2 +0,0 @@
|
||||
NODE_ENV=development
|
||||
IS_SAAS_SERVICE=false
|
2
Common/.env.tpl
Normal file
2
Common/.env.tpl
Normal file
@ -0,0 +1,2 @@
|
||||
NODE_ENV={{ .Env.ENVIRONMENT }}
|
||||
BILLING_ENABLED={{ .Env.BILLING_ENABLED }}
|
@ -1,24 +0,0 @@
|
||||
CLUSTER_KEY=cluster-test
|
||||
|
||||
|
||||
DATABASE_PORT=5432
|
||||
DATABASE_USERNAME=postgres
|
||||
DATABASE_PASSWORD=postgres
|
||||
DATABASE_NAME=oneuptimedb
|
||||
DATABASE_HOST=postgres
|
||||
|
||||
REDIS_PASSWORD=password
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
|
||||
ENCRYPTIOJN_SECRET=encryption-test
|
||||
DISABLE_SIGNUP=false
|
||||
|
||||
REALTIME_HOSTNAME=realtime:3300
|
||||
MAIL_HOSTNAME=mail:3190
|
||||
DASHBOARD_HOSTNAME=dashboard:3000
|
||||
DASHBOARD_API_HOSTNAME=dashboard-api:3002
|
||||
PROBE_API_HOSTNAME=probe-api:3400
|
||||
DATA_INGESTOR_HOSTNAME=data-ingestor:3200
|
||||
ACCOUNTS_HOSTNAME=accounts:3003
|
||||
HOME_HOSTNAME=home:1444
|
24
CommonServer/.env.tpl
Normal file
24
CommonServer/.env.tpl
Normal file
@ -0,0 +1,24 @@
|
||||
ONEUPTIME_SECRET={{ .Env.ONEUPTIME_SECRET }}
|
||||
|
||||
|
||||
DATABASE_PORT={{ .Env.DATABASE_PORT }}
|
||||
DATABASE_USERNAME={{ .Env.DATABASE_USERNAME }}
|
||||
DATABASE_PASSWORD={{ .Env.DATABASE_PASSWORD }}
|
||||
DATABASE_NAME={{ .Env.DATABASE_NAME }}
|
||||
DATABASE_HOST={{ .Env.DATABASE_HOST }}
|
||||
|
||||
REDIS_PASSWORD={{ .Env.REDIS_PASSWORD }}
|
||||
REDIS_HOST={{ .Env.REDIS_HOST }}
|
||||
REDIS_PORT={{ .Env.REDIS_PORT }}
|
||||
|
||||
ENCRYPTION_SECRET={{ .Env.ENCRYPTION_SECRET }}
|
||||
DISABLE_SIGNUP={{ .Env.DISABLE_SIGNUP }}
|
||||
|
||||
REALTIME_HOSTNAME={{ .Env.REALTIME_HOSTNAME }}
|
||||
MAIL_HOSTNAME={{ .Env.MAIL_HOSTNAME }}
|
||||
DASHBOARD_HOSTNAME=d{{ .Env.DASHBOARD_HOSTNAME }}
|
||||
DASHBOARD_API_HOSTNAME={{ .Env.DASHBOARD_API_HOSTNAME }}
|
||||
PROBE_API_HOSTNAME={{ .Env.DATA_INGESTOR_HOSTNAME }}
|
||||
DATA_INGESTOR_HOSTNAME={{ .Env.DATA_INGESTOR_HOSTNAME }}
|
||||
ACCOUNTS_HOSTNAME={{ .Env.ACCOUNTS_HOSTNAME }}
|
||||
HOME_HOSTNAME={{ .Env.HOME_HOSTNAME }}
|
@ -5,7 +5,7 @@ import Hostname from 'Common/Types/API/Hostname';
|
||||
|
||||
export const DisableSignup: boolean = process.env['DISABLE_SIGNUP'] === 'true';
|
||||
|
||||
export const IsSaaSService: boolean = process.env['IS_SAAS_SERVICE'] === 'true';
|
||||
export const IsSaaSService: boolean = process.env['BILLING_ENABLED'] === 'true';
|
||||
|
||||
export const DatabaseHost: Hostname = Hostname.fromString(
|
||||
process.env['DATABASE_HOST'] || ''
|
||||
@ -22,7 +22,7 @@ export const DatabaseName: string =
|
||||
process.env['DATABASE_NAME'] || 'oneuptimedb';
|
||||
|
||||
export const EncryptionSecret: ObjectID = new ObjectID(
|
||||
process.env['ENCRYPTIOJN_SECRET'] || ''
|
||||
process.env['ENCRYPTION_SECRET'] || ''
|
||||
);
|
||||
|
||||
export const AirtableApiKey: string = process.env['AIRTABLE_API_KEY'] || '';
|
||||
|
@ -1,13 +0,0 @@
|
||||
REALTIME_ROUTE=/realtime
|
||||
MAIL_ROUTE=/mail
|
||||
DASHBOARD_ROUTE=/dashboard
|
||||
DASHBOARD_API_ROUTE=/api
|
||||
PROBE_API_ROUTE=/probe-api
|
||||
DATA_INGESTOR_ROUTE=/data-ingestor
|
||||
ACCOUNTS_ROUTE=/accounts
|
||||
HOME_ROUTE=/home
|
||||
HELMCHARTS_ROUTE=/charts
|
||||
APIDOCS_ROUTE=/docs
|
||||
IDENTITY_ROUTE=/identity
|
||||
FILE_ROUTE=/file
|
||||
STATUS_PAGE_ROUTE=/status-page
|
13
CommonUI/.env.tpl
Normal file
13
CommonUI/.env.tpl
Normal file
@ -0,0 +1,13 @@
|
||||
REALTIME_ROUTE={{ .Env.REALTIME_ROUTE }}
|
||||
MAIL_ROUTE={{ .Env.MAIL_ROUTE }}
|
||||
DASHBOARD_ROUTE={{ .Env.DASHBOARD_ROUTE }}
|
||||
DASHBOARD_API_ROUTE={{ .Env.DASHBOARD_API_ROUTE }}
|
||||
PROBE_API_ROUTE={{ .Env.PROBE_API_ROUTE }}
|
||||
DATA_INGESTOR_ROUTE={{ .Env.DATA_INGESTOR_ROUTE }}
|
||||
ACCOUNTS_ROUTE={{ .Env.ACCOUNTS_ROUTE }}
|
||||
HOME_ROUTE={{ .Env.HOME_ROUTE }}
|
||||
HELMCHARTS_ROUTE={{ .Env.HELMCHARTS_ROUTE }}
|
||||
APIDOCS_ROUTE={{ .Env.APIDOCS_ROUTE }}
|
||||
IDENTITY_ROUTE={{ .Env.IDENTITY_ROUTE }}
|
||||
FILE_ROUTE={{ .Env.FILE_ROUTE }}
|
||||
STATUS_PAGE_ROUTE={{ .Env.STATUS_PAGE_ROUTE }}
|
@ -14,7 +14,7 @@ export const HTTP_PROTOCOL: Protocol = window.location.protocol.includes(
|
||||
? Protocol.HTTPS
|
||||
: Protocol.HTTP;
|
||||
|
||||
export const IS_SAAS_SERVICE: boolean = env('IS_SAAS_SERVICE') === 'true';
|
||||
export const BILLING_ENABLED: boolean = env('BILLING_ENABLED') === 'true';
|
||||
export const DISABLE_SIGNUP: boolean = env('DISABLE_SIGNUP') === 'true';
|
||||
export const VERSION: Version = new Version(env('VERSION') || '1.0.0');
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
node_modules/
|
||||
kubernetes/
|
||||
.vscode/
|
||||
.DS_Store
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
yarn.lock
|
@ -1,5 +0,0 @@
|
||||
CLUSTER_KEY=f414c23b4cdf4e84a6a66ecfd528eff2
|
||||
CONTAINER_SCANNER_NAME=US
|
||||
CONTAINER_SCANNER_KEY=33b674ca-9fdd-11e9-a2a3-2a2ae2dbccez
|
||||
SERVER_URL=http://localhost:3002
|
||||
ENCRYPTION_KEY=01234567890123456789012345678901
|
3
ContainerScanner/.gitignore
vendored
3
ContainerScanner/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
node_modules
|
||||
kubernetes
|
||||
debug.log
|
@ -1,65 +0,0 @@
|
||||
#
|
||||
# ContainerScanner Dockerfile
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:alpine
|
||||
|
||||
# Install bash.
|
||||
RUN apk update && apk add bash && apk add curl
|
||||
|
||||
#Use bash shell by default
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN npm install typescript -g
|
||||
RUN npm install ts-node -g
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
COPY ./Common /usr/src/Common
|
||||
RUN npm run compile
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
COPY ./Model /usr/src/Model
|
||||
RUN npm run compile
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
RUN npm run compile
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./ContainerScanner/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN npm install -g ts-node
|
||||
RUN npm install -g ts-node-dev
|
||||
|
||||
# Bundle app source
|
||||
COPY ./ContainerScanner /usr/src/app
|
||||
|
||||
# Expose ports.
|
||||
# - 3055: Container Scanner
|
||||
EXPOSE 3055
|
||||
|
||||
#Run the app
|
||||
RUN npm run compile
|
||||
CMD [ "npm", "start"]
|
@ -1,62 +0,0 @@
|
||||
#
|
||||
# ContainerScanner Dockerfile
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:alpine
|
||||
|
||||
# Install bash.
|
||||
RUN apk update && apk add bash && apk add curl
|
||||
|
||||
#Use bash shell by default
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN npm install typescript -g
|
||||
RUN npm install ts-node -g
|
||||
RUN npm install nodemon -g
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
COPY ./Common /usr/src/Common
|
||||
RUN npm run compile
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
COPY ./Model /usr/src/Model
|
||||
RUN npm run compile
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
RUN npm run compile
|
||||
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
RUN cd /usr/src/app
|
||||
|
||||
# Copy package.json files
|
||||
COPY ./ContainerScanner/package.json /usr/src/app/package.json
|
||||
COPY ./ContainerScanner/package-lock.json /usr/src/app/package-lock.json
|
||||
|
||||
RUN npm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3055: Container Scanner
|
||||
EXPOSE 3055
|
||||
|
||||
#Run the app
|
||||
RUN npm run compile
|
||||
CMD [ "npm", "run", "dev"]
|
||||
|
@ -1,20 +0,0 @@
|
||||
import { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
import Main from './worker/main';
|
||||
|
||||
import cron from 'node-cron';
|
||||
|
||||
export const APP_NAME: string = 'container';
|
||||
const app: ExpressApplication = App(APP_NAME);
|
||||
|
||||
const cronContainerSecurityStartTime: $TSFixMe = Math.floor(Math.random() * 50);
|
||||
|
||||
//Run this cron every 5 minute.
|
||||
cron.schedule('*/5 * * * *', () => {
|
||||
setTimeout(() => {
|
||||
Main.runContainerScan();
|
||||
}, cronContainerSecurityStartTime * 1000);
|
||||
});
|
||||
|
||||
export default app;
|
4774
ContainerScanner/package-lock.json
generated
4774
ContainerScanner/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,35 +0,0 @@
|
||||
{
|
||||
"name": "container-scanner",
|
||||
"version": "3.0.0",
|
||||
"description": "A Container Security Scanner",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"compile": "tsc",
|
||||
"start": "ts-node --max-http-header-size=80000 index.ts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"dev": "node --inspect=0.0.0.0 --max-http-header-size=80000 index.ts",
|
||||
"audit": "npm audit --audit-level=low",
|
||||
"dep-check": "depcheck ./ --skip-missing=true"
|
||||
},
|
||||
"author": "OneUptime Limited.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@types/node": "^17.0.23",
|
||||
"axios": "^0.26.1",
|
||||
"Common": "file:../Common",
|
||||
"Model": "file:../Model",
|
||||
"CommonServer": "file:../CommonServer",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.0.0",
|
||||
"express": "^4.17.3",
|
||||
"node-cron": "^3.0.0",
|
||||
"ping": "^0.4.1",
|
||||
"uuid": "^8.3.2",
|
||||
"winston": "^3.6.0",
|
||||
"winston-slack-transport": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"depcheck": "^1.4.3"
|
||||
}
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
"jsx": "react" /* Specify what JSX code is generated. */,
|
||||
"experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
"emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
||||
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
|
||||
/* Modules */
|
||||
// "module": "es2022" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
"typeRoots": [
|
||||
|
||||
], /* Specify multiple folders that act like `./node_modules/@types`. */
|
||||
"types": ["node"], /* Specify type package names to be included without being referenced in a source file. */
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
// "resolveJsonModule": true, /* Enable importing .json files */
|
||||
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
||||
|
||||
/* JavaScript Support */
|
||||
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
|
||||
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
||||
|
||||
/* Emit */
|
||||
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "./build/dist", /* Specify an output folder for all emitted files. */
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
||||
|
||||
/* Interop Constraints */
|
||||
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
||||
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
||||
"strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
||||
"strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||
"strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
||||
"strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||
"noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
||||
"useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
||||
"alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||
"noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
||||
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
||||
"exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
||||
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
||||
"noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||
|
||||
/* Completeness */
|
||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
import axios from 'axios';
|
||||
import config from './config';
|
||||
|
||||
const _this: $TSFixMe = {
|
||||
getHeaders: () => {
|
||||
return {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
containerScannerName: config.containerScannerName,
|
||||
containerScannerKey: config.containerScannerKey,
|
||||
clusterKey: config.clusterKey,
|
||||
containerScannerVersion: config.containerScannerVersion,
|
||||
};
|
||||
},
|
||||
post: (url: URL, data: $TSFixMe) => {
|
||||
const headers: $TSFixMe = this.getHeaders();
|
||||
|
||||
return new Promise((resolve: Function, reject: Function) => {
|
||||
axios({
|
||||
method: 'POST',
|
||||
url: `${config.serverUrl}/${url}`,
|
||||
headers,
|
||||
data,
|
||||
})
|
||||
.then((response: $TSFixMe) => {
|
||||
resolve(response.data);
|
||||
})
|
||||
.then((error: Error) => {
|
||||
if (error && error.response && error.response.data) {
|
||||
error = error.response.data;
|
||||
}
|
||||
if (error && error.data) {
|
||||
error = error.data;
|
||||
}
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
get: (url: URL) => {
|
||||
const headers: $TSFixMe = this.getHeaders();
|
||||
return new Promise((resolve: Function, reject: Function) => {
|
||||
axios({
|
||||
method: 'GET',
|
||||
url: `${config.serverUrl}/${url}`,
|
||||
headers,
|
||||
})
|
||||
.then((response: $TSFixMe) => {
|
||||
resolve(response.data);
|
||||
})
|
||||
.then((error: Error) => {
|
||||
if (error && error.response && error.response.data) {
|
||||
error = error.response.data;
|
||||
}
|
||||
if (error && error.data) {
|
||||
error = error.data;
|
||||
}
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
put: (url: URL, data: $TSFixMe) => {
|
||||
const headers: $TSFixMe = this.getHeaders();
|
||||
return new Promise((resolve: Function, reject: Function) => {
|
||||
axios({
|
||||
method: 'PUT',
|
||||
url: `${config.serverUrl}/${url}`,
|
||||
headers,
|
||||
data,
|
||||
})
|
||||
.then((response: $TSFixMe) => {
|
||||
resolve(response.data);
|
||||
})
|
||||
.then((error: Error) => {
|
||||
if (error && error.response && error.response.data) {
|
||||
error = error.response.data;
|
||||
}
|
||||
if (error && error.data) {
|
||||
error = error.data;
|
||||
}
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
delete: (url: URL, data: $TSFixMe) => {
|
||||
const headers: $TSFixMe = this.getHeaders();
|
||||
return new Promise((resolve: Function, reject: Function) => {
|
||||
axios({
|
||||
method: 'DELETE',
|
||||
url: `${config.serverUrl}/${url}`,
|
||||
headers,
|
||||
data,
|
||||
})
|
||||
.then((response: $TSFixMe) => {
|
||||
resolve(response.data);
|
||||
})
|
||||
.then((error: Error) => {
|
||||
if (error && error.response && error.response.data) {
|
||||
error = error.response.data;
|
||||
}
|
||||
if (error && error.data) {
|
||||
error = error.data;
|
||||
}
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default _this;
|
@ -1,46 +0,0 @@
|
||||
import packageJson from '../package.json';
|
||||
|
||||
const COMMAND: $TSFixMe = {
|
||||
linux: {
|
||||
load: "top -b -n 2 | egrep --color 'load average|%Cpu'",
|
||||
cpu: "egrep --color 'processor|cores' /proc/cpuinfo",
|
||||
mem: "egrep --color 'Mem|Swap' /proc/meminfo",
|
||||
disk: "df -h | egrep --color '/dev/xvda1|/dev/sda7|/dev/nvme0n1p1'",
|
||||
temp: "sensors | egrep --color 'CPU'",
|
||||
},
|
||||
darwin: {
|
||||
load: "top -l 1 | egrep --color 'Load Avg|CPU usage'",
|
||||
cpu: 'sysctl -n machdep.cpu.core_count',
|
||||
mem: {
|
||||
used: "top -l 1 | egrep --color 'PhysMem'",
|
||||
total: 'sysctl -n hw.memsize',
|
||||
swap: 'sysctl -n vm.swapusage',
|
||||
},
|
||||
disk: "df -h | egrep --color '/dev/disk1s2'",
|
||||
temp: 'sysctl -n machdep.xcpm.cpu_thermal_level',
|
||||
},
|
||||
win: {
|
||||
load: 'wmic cpu get loadpercentage',
|
||||
cpu: 'wmic cpu get numberofcores',
|
||||
mem: {
|
||||
free: 'wmic os get freephysicalmemory',
|
||||
total: 'wmic computersystem get totalphysicalmemory',
|
||||
totalSwap: 'wmic os get totalvirtualmemorySize',
|
||||
freeSwap: 'wmic os get freevirtualmemory',
|
||||
},
|
||||
disk: {
|
||||
total: 'wmic logicaldisk get size',
|
||||
free: 'wmic logicaldisk get freespace',
|
||||
},
|
||||
temp: 'wmic computersystem get thermalstate',
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
COMMAND,
|
||||
serverUrl: process.env['SERVER_URL'],
|
||||
containerScannerName: process.env['CONTAINER_SCANNER_NAME'],
|
||||
containerScannerKey: process.env['CONTAINER_SCANNER_KEY'],
|
||||
clusterKey: process.env['ONEUPTIME_SECRET'],
|
||||
containerScannerVersion: packageJson.version,
|
||||
};
|
@ -1,20 +0,0 @@
|
||||
import BackendAPI from './api';
|
||||
|
||||
export default {
|
||||
updateContainerSecurityToScanning: async function (
|
||||
security: $TSFixMe
|
||||
): void {
|
||||
return await BackendAPI.post(`container/scanning`, { security });
|
||||
},
|
||||
updateContainerSecurityToFailed: async function (security: $TSFixMe): void {
|
||||
return await BackendAPI.post(`container/failed`, security);
|
||||
},
|
||||
updateContainerSecurityLogService: async function (
|
||||
securityLog: $TSFixMe
|
||||
): void {
|
||||
return await BackendAPI.post(`container/log`, securityLog);
|
||||
},
|
||||
updateContainerSecurityScanTime: async function (scanTime: $TSFixMe): void {
|
||||
return await BackendAPI.post(`container/time`, scanTime);
|
||||
},
|
||||
};
|
@ -1,334 +0,0 @@
|
||||
import crypto from 'crypto';
|
||||
import EncryptionKeys from './encryptionKeys';
|
||||
const algorithm: $TSFixMe = EncryptionKeys.algorithm;
|
||||
const key: $TSFixMe = EncryptionKeys.key;
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { v1 as uuidv1 } from 'uuid';
|
||||
import fs from 'fs';
|
||||
import Path from 'path';
|
||||
import { promisify } from 'util';
|
||||
const unlink: $TSFixMe = promisify(fs.unlink);
|
||||
import { spawn } from 'child_process';
|
||||
import {
|
||||
updateContainerSecurityToScanning,
|
||||
updateContainerSecurityLogService,
|
||||
updateContainerSecurityScanTime,
|
||||
updateContainerSecurityToFailed,
|
||||
} from './containerSecurityUpdate';
|
||||
import flattenArray from './flattenArray';
|
||||
|
||||
export default {
|
||||
scan: async function (security: $TSFixMe): void {
|
||||
const decryptedSecurity: $TSFixMe = this.decryptPassword(security);
|
||||
await this.scanContainerSecurity(decryptedSecurity);
|
||||
},
|
||||
|
||||
decryptPassword: async function (security: $TSFixMe): void {
|
||||
const values: $TSFixMe = [];
|
||||
for (let i: $TSFixMe = 0; i <= 15; i++) {
|
||||
values.push(security.dockerCredential.iv[i]);
|
||||
}
|
||||
const iv: $TSFixMe = Buffer.from(values);
|
||||
security.dockerCredential.dockerPassword = await this.decrypt(
|
||||
security.dockerCredential.dockerPassword,
|
||||
iv
|
||||
);
|
||||
return security;
|
||||
},
|
||||
|
||||
decrypt: (encText: $TSFixMe, iv: $TSFixMe) => {
|
||||
const promise: Promise = new Promise(
|
||||
(resolve: Function, reject: Function): $TSFixMe => {
|
||||
try {
|
||||
const decipher: $TSFixMe = crypto.createDecipheriv(
|
||||
algorithm,
|
||||
key,
|
||||
iv
|
||||
);
|
||||
let decoded: $TSFixMe = decipher.update(
|
||||
encText,
|
||||
'hex',
|
||||
'utf8'
|
||||
);
|
||||
decoded += decipher.final('utf8');
|
||||
resolve(decoded);
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
}
|
||||
);
|
||||
return promise;
|
||||
},
|
||||
|
||||
scanContainerSecurity: async (security: $TSFixMe) => {
|
||||
const { imagePath, imageTags }: $TSFixMe = security;
|
||||
const testPath: $TSFixMe = imageTags
|
||||
? `${imagePath}:${imageTags}`
|
||||
: imagePath;
|
||||
const outputFile: string = `${uuidv1()}result.json`;
|
||||
let securityDir: $TSFixMe = 'container_security_dir';
|
||||
|
||||
securityDir = createDir(securityDir);
|
||||
const exactFilePath: $TSFixMe = Path.resolve(securityDir, outputFile);
|
||||
/*
|
||||
* Update container security to scanning true
|
||||
* So the cron job does not pull it multiple times due to network delays
|
||||
* Since the cron job runs every minute
|
||||
*/
|
||||
await updateContainerSecurityToScanning(security);
|
||||
|
||||
return new Promise((resolve: Function, reject: Function) => {
|
||||
// Use trivy open source package to audit a container
|
||||
const scanCommand: string = `trivy image -f json -o ${outputFile} ${testPath}`;
|
||||
const clearCommand: string = `trivy image --clear-cache ${testPath}`;
|
||||
|
||||
const output: $TSFixMe = spawn(scanCommand, {
|
||||
cwd: securityDir,
|
||||
shell: true,
|
||||
});
|
||||
|
||||
output.on('error', async (error: Error) => {
|
||||
const errorMessage: $TSFixMe =
|
||||
'Scanning failed please check your docker credential or image path/tag';
|
||||
|
||||
error.code = 400;
|
||||
error.message = errorMessage;
|
||||
await Promise.all([
|
||||
await updateContainerSecurityToFailed(
|
||||
{
|
||||
_id: security._id,
|
||||
},
|
||||
{ scanning: false }
|
||||
),
|
||||
await updateContainerSecurityScanTime({
|
||||
_id: security._id,
|
||||
}),
|
||||
|
||||
deleteFile(exactFilePath),
|
||||
]);
|
||||
return reject(error);
|
||||
});
|
||||
|
||||
output.on('close', async () => {
|
||||
let auditLogs: $TSFixMe = readFileContent(exactFilePath);
|
||||
/*
|
||||
* If auditLogs is empty, then scanning was unsuccessful
|
||||
* The provided credentials or image path must have been wrong
|
||||
*/
|
||||
if (
|
||||
!auditLogs ||
|
||||
(typeof auditLogs === 'string' &&
|
||||
!JSON.stringify(auditLogs).trim())
|
||||
) {
|
||||
const error: $TSFixMe = new BadDataException(
|
||||
'Scanning failed please check your docker credential or image path/tag'
|
||||
);
|
||||
|
||||
await Promise.all([
|
||||
await updateContainerSecurityToFailed(
|
||||
{
|
||||
_id: security._id,
|
||||
},
|
||||
{ scanning: false }
|
||||
),
|
||||
await updateContainerSecurityScanTime({
|
||||
_id: security._id,
|
||||
}),
|
||||
deleteFile(exactFilePath),
|
||||
]);
|
||||
return reject(error);
|
||||
}
|
||||
|
||||
if (typeof auditLogs === 'string') {
|
||||
auditLogs = JSON.parse(auditLogs); // Parse the stringified logs
|
||||
}
|
||||
|
||||
const clearCache: $TSFixMe = spawn('trivy', [clearCommand], {
|
||||
cwd: securityDir,
|
||||
shell: true,
|
||||
});
|
||||
|
||||
clearCache.on('error', async (error: Error) => {
|
||||
error.code = 400;
|
||||
error.message = 'Unable to clear cache, try again later';
|
||||
await Promise.all([
|
||||
await updateContainerSecurityToFailed(
|
||||
{
|
||||
_id: security._id,
|
||||
},
|
||||
{ scanning: false }
|
||||
),
|
||||
deleteFile(exactFilePath),
|
||||
]);
|
||||
return reject(error);
|
||||
});
|
||||
|
||||
clearCache.on('close', async () => {
|
||||
const auditData: $TSFixMe = {
|
||||
vulnerabilityInfo: {},
|
||||
vulnerabilityData: [],
|
||||
};
|
||||
const counter: $TSFixMe = {
|
||||
low: 0,
|
||||
moderate: 0,
|
||||
high: 0,
|
||||
critical: 0,
|
||||
};
|
||||
|
||||
auditLogs.map((auditLog: $TSFixMe) => {
|
||||
const log: $TSFixMe = {
|
||||
type: auditLog.Type,
|
||||
vulnerabilities: [],
|
||||
};
|
||||
|
||||
if (
|
||||
auditLog.Vulnerabilities &&
|
||||
auditLog.Vulnerabilities.length > 0
|
||||
) {
|
||||
auditLog.Vulnerabilities.map(
|
||||
(vulnerability: $TSFixMe) => {
|
||||
let severity: $TSFixMe;
|
||||
if (vulnerability.Severity === 'LOW') {
|
||||
counter.low += 1;
|
||||
severity = 'low';
|
||||
}
|
||||
if (vulnerability.Severity === 'MEDIUM') {
|
||||
counter.moderate += 1;
|
||||
severity = 'moderate';
|
||||
}
|
||||
if (vulnerability.Severity === 'HIGH') {
|
||||
counter.high += 1;
|
||||
severity = 'high';
|
||||
}
|
||||
if (vulnerability.Severity === 'CRITICAL') {
|
||||
counter.critical += 1;
|
||||
severity = 'critical';
|
||||
}
|
||||
|
||||
const vulObj: $TSFixMe = {
|
||||
vulnerabilityId:
|
||||
vulnerability.VulnerabilityID,
|
||||
library: vulnerability.PkgName,
|
||||
installedVersion:
|
||||
vulnerability.InstalledVersion,
|
||||
fixedVersions:
|
||||
vulnerability.FixedVersion,
|
||||
title: vulnerability.Title,
|
||||
description: vulnerability.Description,
|
||||
severity,
|
||||
};
|
||||
|
||||
log.vulnerabilities.push(vulObj);
|
||||
|
||||
return vulnerability;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
auditData.vulnerabilityData.push(log);
|
||||
return auditLog;
|
||||
});
|
||||
|
||||
auditData.vulnerabilityInfo = counter;
|
||||
|
||||
const arrayData: $TSFixMe = auditData.vulnerabilityData.map(
|
||||
(log: $TSFixMe) => {
|
||||
return log.vulnerabilities;
|
||||
}
|
||||
);
|
||||
|
||||
auditData.vulnerabilityData = flattenArray(arrayData);
|
||||
|
||||
const criticalArr: $TSFixMe = [],
|
||||
highArr: $TSFixMe = [],
|
||||
moderateArr: $TSFixMe = [],
|
||||
lowArr: $TSFixMe = [];
|
||||
auditData.vulnerabilityData.map(
|
||||
(vulnerability: $TSFixMe) => {
|
||||
if (vulnerability.severity === 'critical') {
|
||||
criticalArr.push(vulnerability);
|
||||
}
|
||||
|
||||
if (vulnerability.severity === 'high') {
|
||||
highArr.push(vulnerability);
|
||||
}
|
||||
|
||||
if (vulnerability.severity === 'moderate') {
|
||||
moderateArr.push(vulnerability);
|
||||
}
|
||||
|
||||
if (vulnerability.severity === 'low') {
|
||||
lowArr.push(vulnerability);
|
||||
}
|
||||
return vulnerability;
|
||||
}
|
||||
);
|
||||
|
||||
auditData.vulnerabilityData = [
|
||||
...criticalArr,
|
||||
|
||||
...highArr,
|
||||
|
||||
...moderateArr,
|
||||
|
||||
...lowArr,
|
||||
];
|
||||
|
||||
const securityLog: $TSFixMe =
|
||||
await updateContainerSecurityLogService({
|
||||
securityId: security._id,
|
||||
componentId: security.componentId._id,
|
||||
data: auditData,
|
||||
});
|
||||
|
||||
await Promise.all([
|
||||
await updateContainerSecurityScanTime({
|
||||
_id: security._id,
|
||||
}),
|
||||
deleteFile(exactFilePath),
|
||||
]);
|
||||
resolve(securityLog);
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
function createDir(dirPath: $TSFixMe): void {
|
||||
return new Promise((resolve: Function, reject: Function) => {
|
||||
const workPath: $TSFixMe = Path.resolve(process.cwd(), dirPath);
|
||||
if (fs.existsSync(workPath)) {
|
||||
resolve(workPath);
|
||||
}
|
||||
|
||||
fs.mkdir(workPath, (error: Error) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
}
|
||||
resolve(workPath);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function readFileContent(filePath: $TSFixMe): void {
|
||||
return new Promise((resolve: Function, reject: Function) => {
|
||||
if (fs.existsSync(filePath)) {
|
||||
fs.readFile(
|
||||
filePath,
|
||||
{ encoding: 'utf8' },
|
||||
(error: $TSFixMe, data: $TSFixMe): void => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
}
|
||||
resolve(data);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteFile(file: $TSFixMe): void {
|
||||
if (fs.existsSync(file)) {
|
||||
await unlink(file);
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
export default {
|
||||
algorithm: 'aes-256-cbc',
|
||||
key: process.env['ENCRYPTION_KEY'],
|
||||
};
|
@ -1,20 +0,0 @@
|
||||
/**
|
||||
* @param {array} arr array that needs flattening
|
||||
* @description flattens an array of any depth
|
||||
* @return {array} a flattened array
|
||||
*/
|
||||
|
||||
export default function flat(arr: $TSFixMe): void {
|
||||
const flattened: $TSFixMe = [];
|
||||
const flatten: Function = (arr: $TSFixMe): void => {
|
||||
for (const val of arr) {
|
||||
if (Array.isArray(val)) {
|
||||
flatten(val);
|
||||
} else {
|
||||
flattened.push(val);
|
||||
}
|
||||
}
|
||||
};
|
||||
flatten(arr);
|
||||
return flattened;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
import ContainerService from '../Utils/containerService';
|
||||
|
||||
export default {
|
||||
scan: async (security: $TSFixMe) => {
|
||||
ContainerService.scan(security);
|
||||
},
|
||||
};
|
@ -1,20 +0,0 @@
|
||||
import BackendAPI from '../Utils/api';
|
||||
|
||||
import ContainerSecurity from './containerSecurity';
|
||||
|
||||
export default {
|
||||
runContainerScan: async function (): void {
|
||||
const securities: $TSFixMe = await BackendAPI.get(
|
||||
'container/containerSecurities'
|
||||
);
|
||||
if (securities && securities.length > 0) {
|
||||
await Promise.all(
|
||||
securities.map((security: $TSFixMe) => {
|
||||
return ContainerSecurity.scan(security);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
},
|
||||
};
|
@ -1 +0,0 @@
|
||||
PORT=3002
|
1
DashboardAPI/.env.tpl
Executable file
1
DashboardAPI/.env.tpl
Executable file
@ -0,0 +1 @@
|
||||
PORT={{ .Env.DASHBOARD_API_PORT }}
|
1
File/.env.tpl
Normal file
1
File/.env.tpl
Normal file
@ -0,0 +1 @@
|
||||
PORT={{ .Env.FILE_PORT }}
|
@ -1,2 +0,0 @@
|
||||
SMTP_USER=user@oneuptime.com
|
||||
SMTP_PASSWORD=oneuptime
|
2
Haraka/.env.tpl
Normal file
2
Haraka/.env.tpl
Normal file
@ -0,0 +1,2 @@
|
||||
SMTP_USER={{ .Env.INTERNAL_SMTP_USER }}
|
||||
SMTP_PASSWORD={{ .Env.INTERNAL_SMTP_PASSWORD }}
|
0
HelmChart/.env.tpl
Normal file
0
HelmChart/.env.tpl
Normal file
@ -31,7 +31,7 @@ spec:
|
||||
{{- if .Values.saas.isSaasService }}
|
||||
- name: STRIPE_PUBLIC_KEY
|
||||
value: {{ $.Values.saas.stripe.publicKey }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: AMPLITUDE_PUBLIC_KEY
|
||||
value: {{ $.Values.saas.amplitude.key }}
|
||||
|
@ -49,7 +49,7 @@ spec:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
{{- if .Values.saas.isSaasService }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
{{- else }}
|
||||
- name: LICENSE_URL
|
||||
|
@ -36,7 +36,7 @@ spec:
|
||||
limits:
|
||||
cpu: 500m
|
||||
env:
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: NODE_ENV
|
||||
value: {{ $.Values.nodeEnv }}
|
||||
|
@ -34,7 +34,7 @@ spec:
|
||||
value: {{ $.Values.host.applicationScannerPort | quote }}
|
||||
- name: SERVER_URL
|
||||
value: {{ template "oneuptime.serverUrl" $ }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: APPLICATION_SCANNER_NAME
|
||||
value: {{ $.Values.applicationScanner.name }}
|
||||
|
@ -138,7 +138,7 @@ spec:
|
||||
value: {{ $.Values.saas.stripe.privateKey }}
|
||||
- name: SLACK_BILLING_WEBHOOK
|
||||
value: {{ $.Values.saas.stripe.slackWebhook }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: TWITTER_BEARER_TOKEN
|
||||
value: {{ $.Values.saas.twitter.bearertoken }}
|
||||
|
@ -34,7 +34,7 @@ spec:
|
||||
value: {{ $.Values.host.containerScannerPort | quote }}
|
||||
- name: SERVER_URL
|
||||
value: {{ template "oneuptime.serverUrl" $ }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: CONTAINER_SCANNER_NAME
|
||||
value: {{ $.Values.containerScanner.name }}
|
||||
|
@ -61,7 +61,7 @@ spec:
|
||||
{{- if .Values.saas.isSaasService }}
|
||||
- name: STRIPE_PUBLIC_KEY
|
||||
value: {{ $.Values.saas.stripe.publicKey }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: AMPLITUDE_PUBLIC_KEY
|
||||
value: {{ $.Values.saas.amplitude.key }}
|
||||
|
@ -30,7 +30,7 @@ spec:
|
||||
name: {{ printf "%s-%s" $.Release.Name "InitScript" }}
|
||||
imagePullPolicy: {{ $.Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: NODE_ENV
|
||||
value: 'development'
|
||||
|
@ -35,7 +35,7 @@ spec:
|
||||
limits:
|
||||
cpu: 500m
|
||||
env:
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: NODE_ENV
|
||||
value: 'production'
|
||||
|
@ -35,7 +35,7 @@ spec:
|
||||
limits:
|
||||
cpu: 500m
|
||||
env:
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: NODE_ENV
|
||||
value: {{ $.Values.nodeEnv }}
|
||||
|
@ -52,7 +52,7 @@ spec:
|
||||
- name: ONEUPTIME_HOST
|
||||
value: {{ $.Values.oneuptime.hosts.host1.host }}
|
||||
{{- if .Values.saas.isSaasService }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
{{- end }}
|
||||
- name: NODE_ENV
|
||||
|
@ -55,7 +55,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: AIRTABLE_API_KEY
|
||||
value: {{ $.Values.saas.licensing.airtable.key }}
|
||||
|
@ -34,7 +34,7 @@ spec:
|
||||
value: {{ $.Values.host.lighthouseRunnerPort | quote }}
|
||||
- name: SERVER_URL
|
||||
value: {{ template "oneuptime.serverUrl" $ }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: ONEUPTIME_SECRET
|
||||
valueFrom:
|
||||
|
@ -68,7 +68,7 @@ spec:
|
||||
name: {{ printf "%s-%s" $.Release.Name "configmap" }}
|
||||
key: clusterkey
|
||||
{{- if $.Values.saas.isSaasService }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: SLACK_ERROR_LOG_WEBHOOK
|
||||
value: {{ $.Values.saas.slackErrorLog.webhook }}
|
||||
|
@ -54,7 +54,7 @@ spec:
|
||||
value: {{ $.Values.nodeEnv }}
|
||||
- name: SERVER_URL
|
||||
value: {{ template "oneuptime.serverUrl" $ }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: ONEUPTIME_SECRET
|
||||
valueFrom:
|
||||
|
@ -59,7 +59,7 @@ spec:
|
||||
- name: MONGO_URL
|
||||
value: {{ template "oneuptime.mongodbConnectionString" . }}
|
||||
{{- if .Values.saas.isSaasService }}
|
||||
- name: IS_SAAS_SERVICE
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: STATUSPAGE_CERT
|
||||
value: {{ $.Values.statusPage.cert }}
|
||||
|
1
Home/.env.tpl
Normal file
1
Home/.env.tpl
Normal file
@ -0,0 +1 @@
|
||||
PORT={{ .Env.HOME_PORT }}
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > API MONITORING');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > APP SECURITY');
|
||||
}
|
||||
</script>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<p>California Consumer Privacy Act (CCPA)</p>
|
||||
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > CCPA');
|
||||
}
|
||||
</script>
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
<p>Company and Contact Information</p>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > CONTACT');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > DOCKER CONTAINER SECURITY');
|
||||
}
|
||||
</script>
|
||||
|
@ -13,8 +13,8 @@
|
||||
<link rel="stylesheet" href="/css/customers.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > CUSTOMERS');
|
||||
}
|
||||
</script>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<p>OneUptime customers will be able to choose which country or region their data is stored while fulfilling corporate
|
||||
policies and compliance requirements</p>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > DATA RESIDENCY');
|
||||
}
|
||||
</script>
|
||||
|
@ -15,8 +15,8 @@
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script src="/js/getCookies.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > REQUEST DEMO');
|
||||
}
|
||||
</script>
|
||||
@ -1168,8 +1168,8 @@
|
||||
try {
|
||||
var queryString = $('#demoform').serialize();
|
||||
var formData = Object.fromEntries(new URLSearchParams(queryString));
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('EVENT: SUBMITTED REQUEST DEMO FORM', { data: formData });
|
||||
}
|
||||
} catch { }
|
||||
@ -1188,8 +1188,8 @@
|
||||
document.getElementById('demoform').addEventListener('click', function () {
|
||||
var queryString = $('#demoform').serialize();
|
||||
var formData = Object.fromEntries(new URLSearchParams(queryString));
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('EVENT: SUBMITTED REQUEST DEMO FORM', { data: formData });
|
||||
}
|
||||
})
|
||||
|
@ -6,8 +6,8 @@
|
||||
we have implemented for OneUptime services</p>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > DMCA');
|
||||
}
|
||||
</script>
|
||||
|
@ -1194,9 +1194,9 @@
|
||||
$("#two").text(resources[i].two);
|
||||
$("#three").text(resources[i].three);
|
||||
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
|
||||
if (IS_SAAS_SERVICE) {
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > RESOURCES > ' + resources[i].title);
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > ENTERPRISE OVERVIEW');
|
||||
}
|
||||
</script>
|
||||
|
@ -13,8 +13,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > ERROR TRACKING');
|
||||
}
|
||||
</script>
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
<p>Request our Requirements for HIPAA Entities</p>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > HIPAA');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > INCIDENT MANAGEMENT & RESPONSE');
|
||||
}
|
||||
</script>
|
||||
|
@ -15,8 +15,8 @@
|
||||
<script defer src="/js/home.js"></script>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > IoT DEVICE MONITORING');
|
||||
}
|
||||
</script>
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
<p>The ISO/IEC 27000 family of standards helps organizations keep information assets secure.</p>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > ISO 27001');
|
||||
}
|
||||
</script>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<p>Information technology — Security techniques — Code of practice for information security controls based on
|
||||
ISO/IEC 27002 for cloud services</p>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > ISO 27017');
|
||||
}
|
||||
</script>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<p>Information technology — Security techniques — Code of practice for protection of personally identifiable
|
||||
information (PII) in public clouds acting as PII processors</p>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > ISO 27018');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > API MONITORING');
|
||||
}
|
||||
</script>
|
||||
|
@ -11,8 +11,8 @@
|
||||
<link rel="stylesheet" href="/css/legal.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL');
|
||||
}
|
||||
</script>
|
||||
|
@ -13,8 +13,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > LOGS MANAGEMENT');
|
||||
}
|
||||
</script>
|
||||
|
@ -11,8 +11,8 @@
|
||||
<link rel="stylesheet" href="/css/home.css">
|
||||
<script defer src="/js/home.js"></script>
|
||||
<script>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > NOT FOUND (404)');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css" />
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > ON CALL');
|
||||
}
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<header id="pagmt">
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > PCI');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > API MONITORING');
|
||||
}
|
||||
</script>
|
||||
|
@ -8,8 +8,8 @@
|
||||
<%- include('head') -%>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRICING');
|
||||
}
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<header id="pagmt">
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > PRIVACY POLICY');
|
||||
}
|
||||
</script>
|
||||
|
@ -15,8 +15,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > PUBLIC STATUS PAGE');
|
||||
}
|
||||
</script>
|
||||
|
@ -10,8 +10,8 @@
|
||||
<%- include('head') -%>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > COMPARE PRODUCT > <%= productConfig.productName %>');
|
||||
}
|
||||
</script>
|
||||
|
@ -15,8 +15,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > PUBLIC STATUS PAGE');
|
||||
}
|
||||
</script>
|
||||
|
@ -23,8 +23,8 @@
|
||||
<script defer src="/js/resources.js"></script>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > RESOURCES');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="/css/products.css">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > PRODUCT > SERVER MONITORING');
|
||||
}
|
||||
</script>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<h1>Service Level Agreement</h1>
|
||||
<p>Please Read Carefully Prior To Using This Product</p>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1); var IS_DEV = window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1;
|
||||
if (IS_SAAS_SERVICE) {
|
||||
<script type="module" async>var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1); var IS_DEV = window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1;
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > SLA');
|
||||
}
|
||||
</script>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<p>Service Organization Control (SOC) Reports</p>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > SOC 2');
|
||||
}
|
||||
</script>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<p>Service Organization Control (SOC) Reports</p>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > SOC 3');
|
||||
}
|
||||
</script>
|
||||
|
@ -6,8 +6,8 @@
|
||||
data processors with access to certain Customer Data.</p>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > SUB-PROCESSORS');
|
||||
}
|
||||
</script>
|
||||
|
@ -97,8 +97,8 @@
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > SUPPORT');
|
||||
}
|
||||
</script>
|
||||
|
@ -12,8 +12,8 @@
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap">
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > SUPPORT');
|
||||
}
|
||||
</script>
|
||||
|
@ -3,8 +3,8 @@
|
||||
<p>Please Read Carefully Prior To Using This Product</p>
|
||||
<script src="/js/amplitude.js"></script>
|
||||
<script type="module" async>
|
||||
var IS_SAAS_SERVICE = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (IS_SAAS_SERVICE) {
|
||||
var BILLING_ENABLED = !(window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('staging') > -1);
|
||||
if (BILLING_ENABLED) {
|
||||
amplitude.getInstance().logEvent('PAGE VIEW: HOME > LEGAL > TERMS');
|
||||
}
|
||||
</script>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user