Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-137684 | A security flaw has been discovered in eosphoros-ai DB-GPT up to 0.8.3. This affects the function editor_sql_run of the file packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/editor/api_editor_v1.py of the component Editor SQL Run API. Performing a manipulation of the argument db_name results in authorization bypass. It is possible to initiate the attack remotely. The exploit has been released to the public and may be used for attacks. The pull request to fixCVSS 8.7CVE-2026-137992 | libexpat through 2.11.0 contains a denial of service vulnerability in defineAttribute() of lib/xmlparse.c that fails to detect duplicate non-ID #IMPLIED or #REQUIRED attribute declarations. Attackers can supply a crafted XML document with repeated ATTLIST declarations in an internal DTD subset to cause quadratic CPU consumption in storeAtts() during parsing.CVSS 8.5CVE-2026-137994 | Leo through 6.8.10 contains an insecure deserialization vulnerability that allows attackers to execute code by embedding pickled data in unknown XML attributes of .leo outlines. Attackers can place a pickle __reduce__ gadget in a or element attribute that resolveUa passes to pickle.loads, executing code with user privileges when the outline is opened.CVSS 7.0CVE-2026-137995 | FOG Project before 1.6.0.119 contains an information disclosure vulnerability that allows unauthenticated attackers to obtain host tokens from status/hostgetkey.php by supplying a host MAC address. Attackers can present the token to service/hostinfo.php to retrieve decrypted Active Directory join credentials and Windows product keys during deployment windows.CVSS 6.8CVE-2026-137996 | Zettlr before 4.11.0 fails to validate URI schemes in Markdown link targets, allowing attackers to launch arbitrary registered protocol handlers via Electron shell.openExternal without confirmation. Attackers can craft documents whose Ctrl/Cmd-clicked links use smb:// to leak NTLM credential hashes on Windows or invoke custom protocol handlers with attacker-controlled parameters.CVSS 8.5CVE-2026-137997 | HCIPy through 0.7.1 contains an insecure deserialization vulnerability that allows attackers to execute code by supplying crafted .pkl files to read_field, read_grid or read_mode_basis. Because hcipy/util/io.py selects pickle by file extension and calls pickle.load, a __reduce__ gadget in a pupil, apodizer, PSF or mode-basis file runs code with the user's privileges.CVSS 8.5CVE-2026-137998 | Detoxify 0.5.3 through 0.5.4 contains an insecure deserialization vulnerability in load_checkpoint that allows attackers to execute code by supplying a crafted checkpoint file. Attackers can embed a pickle __reduce__ gadget in a .ckpt file loaded via torch.load with weights_only=False to run code with the user's privileges.CVSS 8.5CVE-2026-137999 | JSONSchema2PoPo2 through 3.0.3 contains a code injection vulnerability that allows attackers to inject Python code by supplying JSON Schema default or format values that are written unescaped. Attackers can place a single quote in a string property default to break out of the literal in the generated __init__ signature, executing injected code when the generated module is imported.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

Angular Modules

1. What is an NgModule An NgModule groups related components, directives, and pipes together. It was the primary way to structure Angular apps before…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 3 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung




1. What is an NgModule



An NgModule groups related components, directives, and pipes together. It was the primary way to structure Angular apps before standalone components arrived in Angular 14.



NgModules are not deprecated — they are still fully supported in Angular 21. Only platformBrowserDynamic (the old bootstrap function) was deprecated. The recommended path for new projects is standalone components, but NgModules remain valid for existing codebases.









2. NgModule Anatomy



The @NgModule decorator accepts five main properties:
































Property Purpose
declarations Non-standalone components, directives, and pipes owned by this module
imports Other NgModules or standalone components/pipes this module needs
exports What this module exposes to other modules that import it
providers Services to register (prefer providedIn: 'root' on the service itself)
bootstrap The root component Angular renders on startup — root module only





@NgModule({
declarations: [App],
bootstrap: [App],
imports: [BrowserModule, CommonModule, Tasks, NewTask, Task, User, Header, RouterOutlet],
})
export class AppModule {}












3. declarations vs imports



This is the most common source of confusion when mixing modules with standalone components.





  • declarations — only for non-standalone components (standalone: false). They are private to this module unless explicitly exported.


  • imports — for other NgModules and for standalone components, directives, and pipes (the default since Angular 17).



Putting a standalone component in declarations causes a compile error. Putting a non-standalone component in imports also causes an error.




// non-standalone component — belongs in declarations
@Component({
standalone: false,
selector: 'app-root',
templateUrl: './app.html',
styleUrl: './app.css',
})
export class App {}









// standalone component (Angular 17+ default) — belongs in imports, not declarations
@Component({
selector: 'app-header',
templateUrl: './header.html',
})
export class Header {}









@NgModule({
declarations: [App], // non-standalone
imports: [BrowserModule, Header, RouterOutlet], // standalone components go here
bootstrap: [App],
})
export class AppModule {}






A non-standalone component also cannot have an imports array in @Component — it delegates all imports to its module.









4. BrowserModule vs CommonModule




















Module Use when
BrowserModule Root module only — sets up the browser platform, includes CommonModule internally
CommonModule Feature modules — provides NgIf, NgFor, NgClass, pipes, etc.


Never import BrowserModule in a feature module — import CommonModule instead. Importing BrowserModule twice throws a runtime error.









5. Bootstrapping with NgModule



Use platformBrowser().bootstrapModule() from @angular/platform-browser. The older platformBrowserDynamic from @angular/platform-browser-dynamic was deprecated in Angular 21.




// main.ts
import { platformBrowser } from '@angular/platform-browser';
import { AppModule } from './app/app.module';

platformBrowser().bootstrapModule(AppModule)
.catch((err: unknown) => console.error(err));












6. Feature Modules



Feature modules group a slice of the app (e.g. tasks, users) to keep AppModule small. They export only what the rest of the app needs.




// tasks/tasks.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TasksComponent } from './tasks.component';

@NgModule({
declarations: [TasksComponent],
imports: [CommonModule],
exports: [TasksComponent],
})
export class TasksModule {}









// app.module.ts
@NgModule({
declarations: [App],
imports: [BrowserModule, TasksModule],
bootstrap: [App],
})
export class AppModule {}












7. Lazy-Loaded Feature Modules



Lazy loading defers loading a module's bundle until the user navigates to its route. Configure it with loadChildren in the router:




// app.routes.ts
export const routes: Routes = [
{
path: 'tasks',
loadChildren: () =>
import('./tasks/tasks.module').then((m) => m.TasksModule),
},
];









// tasks/tasks.module.ts — use forChild, not forRoot
@NgModule({
declarations: [TasksComponent],
imports: [
CommonModule,
RouterModule.forChild([{ path: '', component: TasksComponent }]),
],
})
export class TasksModule {}






The root module uses RouterModule.forRoot(routes). Feature modules use RouterModule.forChild(routes).









8. NgModule vs Standalone






































NgModule Standalone
Grouping Explicit module files No module needed
Sharing Export from module, import the module Import the component directly
Lazy loading loadChildren loadComponent
Recommended for new projects No Yes
Deprecated No —


NgModules are still valid and fully supported. Understanding them is essential for working with existing Angular codebases.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Community Rating & Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

2 Cluster
2 Quellen
OpenAI counter-sues Apple over trade secret theft
AppleInsider News vor 14 Min.
1 weitere Quelle
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Angular Modules

Thematisch verwandte Begriffe: Angular, Modules · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag