diff --git a/packages/app/src/components/SecurityTab/SecurityTab.tsx b/packages/app/src/components/SecurityTab/SecurityTab.tsx
new file mode 100644
index 0000000000..2adca3b0ef
--- /dev/null
+++ b/packages/app/src/components/SecurityTab/SecurityTab.tsx
@@ -0,0 +1,25 @@
+/* eslint-disable no-console */
+/*
+ * Copyright 2022 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import React from 'react';
+import { useEntity } from '@backstage/plugin-catalog-react';
+
+export function SecurityTab(): JSX.Element | null {
+ const entity = useEntity();
+ console.log(entity);
+ return
Security
;
+}
diff --git a/packages/app/src/components/SecurityTab/index.ts b/packages/app/src/components/SecurityTab/index.ts
new file mode 100644
index 0000000000..2c7908e958
--- /dev/null
+++ b/packages/app/src/components/SecurityTab/index.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2022 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+export { SecurityTab } from './SecurityTab';
+export { showSecurityTab } from './showSecurityTab';
diff --git a/packages/app/src/components/SecurityTab/showSecurityTab.ts b/packages/app/src/components/SecurityTab/showSecurityTab.ts
new file mode 100644
index 0000000000..364436e44e
--- /dev/null
+++ b/packages/app/src/components/SecurityTab/showSecurityTab.ts
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2022 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { Entity } from '@backstage/catalog-model';
+
+export const SECURITY_ANNOTATION = 'myorg.org/security';
+
+/** @public */
+export const showSecurityTab = (entity: Entity) =>
+ Boolean(entity.metadata.annotations?.[SECURITY_ANNOTATION]);
diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx
index 02b00f038c..6288dc86ee 100644
--- a/packages/app/src/components/catalog/EntityPage.tsx
+++ b/packages/app/src/components/catalog/EntityPage.tsx
@@ -154,6 +154,8 @@ import {
ReportIssue,
} from '@backstage/plugin-techdocs-module-addons-contrib';
import { EntityCostInsightsContent } from '@backstage/plugin-cost-insights';
+import { SecurityTab } from '../SecurityTab/SecurityTab';
+import { showSecurityTab } from '../SecurityTab';
const customEntityFilterKind = ['Component', 'API', 'System'];
@@ -400,6 +402,12 @@ const overviewContent = (
);
+const securityContent = (
+
+
+
+);
+
const serviceEntityPage = (
@@ -440,6 +448,8 @@ const serviceEntityPage = (
{techdocsContent}
+ {securityContent}
+