build: Enable tsec checks for critical packages. (#43108)

tsec is a static analyzer that discovers Trusted Types violations.
Deploy tsec to make sure there will be no TT regression in several
critical packages, including core, platform-browser, platform-server
and their dependencies. Existing violations have been reviewed and
exempted in packages/tsec-exemption.json. Future changes to the
exemption list requires security review.

PR Close #43108
This commit is contained in:
Pei Wang
2021-08-10 23:00:20 +00:00
committed by Andrew Kushnir
parent 79eee5509f
commit 509031c734
18 changed files with 292 additions and 3 deletions
@@ -0,0 +1,26 @@
/** For building //packages/platform-browser/animations. */
{
"extends": "../../tsconfig-tsec-base.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": ".tsec",
"paths": {
"@angular/core": ["../../core"],
"@angular/common": ["../../common"],
"@angular/platform-browser": ["../"],
"@angular/animations": ["../../animations"],
"@angular/animations/browser": ["../../animations/browser"]
}
},
"include": [
"*.ts",
"src/**/*.ts"
],
"references": [
{"path": "../../core/tsconfig-tsec.json"},
{"path": "../../common/tsconfig-tsec.json"},
{"path": "../tsconfig-tsec.json"},
{"path": "../../animations/tsconfig-tsec.json"},
{"path": "../../animations/browser/tsconfig-tsec.json"}
]
}
@@ -0,0 +1,22 @@
/** For building //packages/platform-browser. */
{
"extends": "../tsconfig-tsec-base.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": ".tsec",
"paths": {
"@angular/core": ["../core"],
"@angular/common": ["../common"]
}
},
"include": [
"*.ts",
"src/**/*.ts",
"../*.d.ts"
],
"references": [
{"path": "../core/tsconfig-tsec.json"},
{"path": "../common/tsconfig-tsec.json"},
{"path": "../zone.js/lib/tsconfig-tsec.json"}
]
}