diff --git a/README.md b/README.md index 7197a8db76..29c19e40b0 100644 --- a/README.md +++ b/README.md @@ -285,9 +285,8 @@ You can deploy Cal on [Railway](https://railway.app/) using the button above. Th ## Roadmap - - Cal.com Roadmap +Cal.com Roadmap 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. diff --git a/SECURITY.md b/SECURITY.md index 45e909fe46..734a6f4e6d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -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. diff --git a/package.json b/package.json index 1f2e12512c..588299e2b8 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/app-store/slackmessaging/lib/actions/createEvent.ts b/packages/app-store/slackmessaging/lib/actions/createEvent.ts index a6f952daeb..7b5ff97b5d 100644 --- a/packages/app-store/slackmessaging/lib/actions/createEvent.ts +++ b/packages/app-store/slackmessaging/lib/actions/createEvent.ts @@ -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"; diff --git a/packages/app-store/slackmessaging/lib/showTodayMessage.ts b/packages/app-store/slackmessaging/lib/showTodayMessage.ts index 83517e7b9a..b7e2eb32e4 100644 --- a/packages/app-store/slackmessaging/lib/showTodayMessage.ts +++ b/packages/app-store/slackmessaging/lib/showTodayMessage.ts @@ -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"; diff --git a/packages/app-store/slackmessaging/lib/slackVerify.ts b/packages/app-store/slackmessaging/lib/slackVerify.ts index f7915f5e4a..8079db0223 100644 --- a/packages/app-store/slackmessaging/lib/slackVerify.ts +++ b/packages/app-store/slackmessaging/lib/slackVerify.ts @@ -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) { diff --git a/packages/app-store/slackmessaging/lib/views/ShowLinks.ts b/packages/app-store/slackmessaging/lib/views/ShowLinks.ts index 1d59c90bf4..7f44db9443 100644 --- a/packages/app-store/slackmessaging/lib/views/ShowLinks.ts +++ b/packages/app-store/slackmessaging/lib/views/ShowLinks.ts @@ -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 { diff --git a/packages/app-store/slackmessaging/lib/views/TodayMessage.ts b/packages/app-store/slackmessaging/lib/views/TodayMessage.ts index 90c8f4101c..9fe52c0a37 100644 --- a/packages/app-store/slackmessaging/lib/views/TodayMessage.ts +++ b/packages/app-store/slackmessaging/lib/views/TodayMessage.ts @@ -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[]) => { diff --git a/packages/app-store/vital/api/webhook.ts b/packages/app-store/vital/api/webhook.ts index 4af3461f16..6592c2a79e 100644 --- a/packages/app-store/vital/api/webhook.ts +++ b/packages/app-store/vital/api/webhook.ts @@ -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"; diff --git a/packages/app-store/vital/lib/reschedule.ts b/packages/app-store/vital/lib/reschedule.ts index efd306972b..2ec90964af 100644 --- a/packages/app-store/vital/lib/reschedule.ts +++ b/packages/app-store/vital/lib/reschedule.ts @@ -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"; diff --git a/packages/app-store/wipemycalother/components/confirmDialog.tsx b/packages/app-store/wipemycalother/components/confirmDialog.tsx index fd586c5ca1..f5b6d46411 100644 --- a/packages/app-store/wipemycalother/components/confirmDialog.tsx +++ b/packages/app-store/wipemycalother/components/confirmDialog.tsx @@ -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"; diff --git a/packages/app-store/wipemycalother/lib/reschedule.ts b/packages/app-store/wipemycalother/lib/reschedule.ts index 23cbc23384..8ffb389f04 100644 --- a/packages/app-store/wipemycalother/lib/reschedule.ts +++ b/packages/app-store/wipemycalother/lib/reschedule.ts @@ -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"; diff --git a/packages/ee/lib/core/checkPremiumUsername.ts b/packages/ee/lib/core/checkPremiumUsername.ts index cf32fd8b81..2d2a015a2a 100644 --- a/packages/ee/lib/core/checkPremiumUsername.ts +++ b/packages/ee/lib/core/checkPremiumUsername.ts @@ -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 { 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", diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts index 8000a43d7a..ae9fc19823 100644 --- a/packages/lib/constants.ts +++ b/packages/lib/constants.ts @@ -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"; diff --git a/turbo.json b/turbo.json index 2f6019b706..da28ca3d9b 100644 --- a/turbo.json +++ b/turbo.json @@ -99,6 +99,10 @@ "cache": false, "outputs": [] }, + "lint:fix": { + "cache": false, + "outputs": [] + }, "lint:report": { "cache": false, "outputs": ["lint-results"]