Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
zomars committed Jul 12, 2022
1 parent b1d637d commit dbfc147
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 38 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,8 @@ You can deploy Cal on [Railway](https://railway.app/) using the button above. Th
<!-- ROADMAP -->

## Roadmap

<a href="https://cal.com/roadmap"><img src="https://user-images.githubusercontent.com/8019099/176388295-25081ca4-207e-4468-8079-37b195fa8e59.png" alt="Cal.com Roadmap" /></a>

<a href="https://cal.com/roadmap"><img src="https://user-images.githubusercontent.com/8019099/176388295-25081ca4-207e-4468-8079-37b195fa8e59.png" alt="Cal.com Roadmap" /></a>

See the [roadmap project](https://cal.com/roadmap) for a list of proposed features (and known issues). You can change the view to see planned tagged releases.

Expand Down
43 changes: 22 additions & 21 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Security

Contact: [email protected]

Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
Expand All @@ -9,30 +10,30 @@ If you discover a vulnerability, we would like to know about it so we can take s

## Out of scope vulnerabilities:

* Clickjacking on pages with no sensitive actions.
* Unauthenticated/logout/login CSRF.
* Attacks requiring MITM or physical access to a user's device.
* Any activity that could lead to the disruption of our service (DoS).
* Content spoofing and text injection issues without showing an attack vector/without being able to modify HTML/CSS.
* Email spoofing
* Missing DNSSEC, CAA, CSP headers
* Lack of Secure or HTTP only flag on non-sensitive cookies
* Deadlinks
- Clickjacking on pages with no sensitive actions.
- Unauthenticated/logout/login CSRF.
- Attacks requiring MITM or physical access to a user's device.
- Any activity that could lead to the disruption of our service (DoS).
- Content spoofing and text injection issues without showing an attack vector/without being able to modify HTML/CSS.
- Email spoofing
- Missing DNSSEC, CAA, CSP headers
- Lack of Secure or HTTP only flag on non-sensitive cookies
- Deadlinks

## Please do the following:

* E-mail your findings to [[email protected]](mailto:[email protected]).
* Do not run automated scanners on our infrastructure or dashboard. If you wish to do this, contact us and we will set up a sandbox for you.
* Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data,
* Do not reveal the problem to others until it has been resolved,
* Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties,
* Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation.
- E-mail your findings to [[email protected]](mailto:[email protected]).
- Do not run automated scanners on our infrastructure or dashboard. If you wish to do this, contact us and we will set up a sandbox for you.
- Do not take advantage of the vulnerability or problem you have discovered, for example by downloading more data than necessary to demonstrate the vulnerability or deleting or modifying other people's data,
- Do not reveal the problem to others until it has been resolved,
- Do not use attacks on physical security, social engineering, distributed denial of service, spam or applications of third parties,
- Do provide sufficient information to reproduce the problem, so we will be able to resolve it as quickly as possible. Usually, the IP address or the URL of the affected system and a description of the vulnerability will be sufficient, but complex vulnerabilities may require further explanation.

## What we promise:

* We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date,
* If you have followed the instructions above, we will not take any legal action against you in regard to the report,
* We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission,
* We will keep you informed of the progress towards resolving the problem,
* In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise), and
* We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved.
- We will respond to your report within 3 business days with our evaluation of the report and an expected resolution date,
- If you have followed the instructions above, we will not take any legal action against you in regard to the report,
- We will handle your report with strict confidentiality, and not pass on your personal details to third parties without your permission,
- We will keep you informed of the progress towards resolving the problem,
- In the public information concerning the problem reported, we will give your name as the discoverer of the problem (unless you desire otherwise), and
- We strive to resolve all problems as quickly as possible, and we would like to play an active role in the ultimate publication on the problem after it is resolved.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"heroku-postbuild": "turbo run @calcom/web#build",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"lint:report": "turbo run lint:report",
"postinstall": "turbo run post-install",
"pre-commit": "lint-staged",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { WebClient } from "@slack/web-api";
import dayjs from "@calcom/dayjs";
import { NextApiRequest, NextApiResponse } from "next";
import { z } from "zod";

import dayjs from "@calcom/dayjs";
import { WEBAPP_URL } from "@calcom/lib/constants";
import db from "@calcom/prisma";
import type { BookingCreateBody } from "@calcom/prisma/zod-utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/slackmessaging/lib/showTodayMessage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BookingStatus } from "@prisma/client";
import dayjs from "@calcom/dayjs";
import { NextApiRequest, NextApiResponse } from "next";

import dayjs from "@calcom/dayjs";
import prisma from "@calcom/prisma";

import { WhereCredsEqualsId } from "./WhereCredsEqualsID";
Expand Down
3 changes: 2 additions & 1 deletion packages/app-store/slackmessaging/lib/slackVerify.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { createHmac } from "crypto";
import dayjs from "@calcom/dayjs";
import { NextApiRequest, NextApiResponse } from "next";
import { stringify } from "querystring";

import dayjs from "@calcom/dayjs";

import { getSlackAppKeys } from "./utils";

export default async function slackVerify(req: NextApiRequest, res: NextApiResponse) {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/slackmessaging/lib/views/ShowLinks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dayjs from "@calcom/dayjs";
import { Blocks, Elements, Message } from "slack-block-builder";

import dayjs from "@calcom/dayjs";
import { WEBAPP_URL } from "@calcom/lib/constants";

interface IEventTypes {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Booking } from "@prisma/client";
import dayjs from "@calcom/dayjs";
import { Blocks, Elements, Message } from "slack-block-builder";

import dayjs from "@calcom/dayjs";
import { WEBAPP_URL } from "@calcom/lib/constants";

const TodayMessage = (bookings: Booking[]) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/vital/api/webhook.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BookingStatus, Prisma } from "@prisma/client";
import dayjs from "@calcom/dayjs";
import type { NextApiRequest, NextApiResponse } from "next";
import queue from "queue";

import dayjs from "@calcom/dayjs";
import { IS_PRODUCTION } from "@calcom/lib/constants";
import { getErrorFromUnknown } from "@calcom/lib/errors";
import { HttpError as HttpCode } from "@calcom/lib/http-error";
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/vital/lib/reschedule.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Booking, BookingReference, BookingStatus, User } from "@prisma/client";
import dayjs from "@calcom/dayjs";
import type { TFunction } from "next-i18next";

import EventManager from "@calcom/core/EventManager";
import { CalendarEventBuilder } from "@calcom/core/builders/CalendarEvent/builder";
import { CalendarEventDirector } from "@calcom/core/builders/CalendarEvent/director";
import { deleteMeeting } from "@calcom/core/videoClient";
import dayjs from "@calcom/dayjs";
import { sendRequestRescheduleEmail } from "@calcom/emails";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ClockIcon, XIcon } from "@heroicons/react/outline";
import dayjs from "@calcom/dayjs";
import { Dispatch, SetStateAction } from "react";
import { useState } from "react";
import { useMutation } from "react-query";

import dayjs from "@calcom/dayjs";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import logger from "@calcom/lib/logger";
import showToast from "@calcom/lib/notification";
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/wipemycalother/lib/reschedule.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Booking, BookingReference, BookingStatus, User } from "@prisma/client";
import dayjs from "@calcom/dayjs";
import type { TFunction } from "next-i18next";

import EventManager from "@calcom/core/EventManager";
import { CalendarEventBuilder } from "@calcom/core/builders/CalendarEvent/builder";
import { CalendarEventDirector } from "@calcom/core/builders/CalendarEvent/director";
import { deleteMeeting } from "@calcom/core/videoClient";
import dayjs from "@calcom/dayjs";
import { sendRequestRescheduleEmail } from "@calcom/emails";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
Expand Down
4 changes: 2 additions & 2 deletions packages/ee/lib/core/checkPremiumUsername.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import slugify from "@calcom/lib/slugify";
import { WEBSITE_URL } from "@calcom/lib/constants";
import slugify from "@calcom/lib/slugify";

interface ResponseUsernameApi {
available: boolean;
Expand All @@ -10,7 +10,7 @@ interface ResponseUsernameApi {

export async function checkPremiumUsername(_username: string): Promise<ResponseUsernameApi> {
const username = slugify(_username);
const response = await fetch(`${ WEBSITE_URL }/api/username`, {
const response = await fetch(`${WEBSITE_URL}/api/username`, {
credentials: "include",
headers: {
"Content-Type": "application/json",
Expand Down
5 changes: 1 addition & 4 deletions packages/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ const VERCEL_URL = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}`
const RAILWAY_STATIC_URL = process.env.RAILWAY_STATIC_URL ? `https://${process.env.RAILWAY_STATIC_URL}` : "";
const HEROKU_URL = process.env.HEROKU_APP_NAME ? `https://${process.env.HEROKU_APP_NAME}.herokuapp.com` : "";
export const WEBAPP_URL =
process.env.NEXT_PUBLIC_WEBAPP_URL ||
VERCEL_URL ||
RAILWAY_STATIC_URL ||
HEROKU_URL;
process.env.NEXT_PUBLIC_WEBAPP_URL || VERCEL_URL || RAILWAY_STATIC_URL || HEROKU_URL;
/** @deprecated use `WEBAPP_URL` */
export const BASE_URL = WEBAPP_URL;
export const WEBSITE_URL = process.env.NEXT_PUBLIC_WEBSITE_URL || "https://cal.com";
Expand Down
4 changes: 4 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
"cache": false,
"outputs": []
},
"lint:fix": {
"cache": false,
"outputs": []
},
"lint:report": {
"cache": false,
"outputs": ["lint-results"]
Expand Down

0 comments on commit dbfc147

Please sign in to comment.