Formatting

This commit is contained in:
zomars 2022-07-12 08:32:27 -06:00
parent b1d637d1a6
commit dbfc1477aa
15 changed files with 41 additions and 38 deletions

View File

@ -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.

View File

@ -1,4 +1,5 @@
# Security
Contact: security@cal.com
Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
@ -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 [security@cal.com](mailto:security@cal.com).
* 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 [security@cal.com](mailto:security@cal.com).
- 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.

View File

@ -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",

View File

@ -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";

View File

@ -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";

View File

@ -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) {

View File

@ -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 {

View File

@ -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[]) => {

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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;
@ -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",

View File

@ -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";

View File

@ -99,6 +99,10 @@
"cache": false,
"outputs": []
},
"lint:fix": {
"cache": false,
"outputs": []
},
"lint:report": {
"cache": false,
"outputs": ["lint-results"]