Zum Hauptinhalt springen
🕵️ SicherheitslückenCVE-2022-44368 | NASM 2.16 null pointer dereference (EUVD-2022-47313)(18.09.2026 um 03:34 Uhr)
🔧 ProgrammierungBuilding a Browser-Based Voxel Editor with React Three Fiber(18.09.2026 um 03:24 Uhr)
🔧 ProgrammierungThe Bottleneck Moved From Writing Code to Proving It(18.09.2026 um 03:32 Uhr)
🕵️ SicherheitslückenCVE-2022-44368 | NASM 2.16 null pointer dereference (EUVD-2022-47313)(18.09.2026 um 03:34 Uhr)
🔧 ProgrammierungBuilding a Browser-Based Voxel Editor with React Three Fiber(18.09.2026 um 03:24 Uhr)
🔧 ProgrammierungThe Bottleneck Moved From Writing Code to Proving It(18.09.2026 um 03:32 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Building an Image Moderation System with AWS Rekognition, Nest.js, and React

Introduction

Images abundant on web platforms in today's digital environment. Images can be an effective means of expression and communication, but they can also be used to spread harmful content such hate speech, violence, and nudity. Image moderation is useful in this situation. Automatic picture analysis is used by image moderation systems to find and mark potentially offensive or dangerous content.
This post will discuss how to use AWS Rekognition, Nest.js, and React to create a reliable image moderation system.Conclusion

Development

We created a demo application to demonstrate the capabilities of AWS Rekognition. A React frontend serves as the user interface in this demo, while a Nest.js backend API manages the laborious task of content analysis.

For this demo, we will use this GitHub repository where you can set the settings such as API Key, connection string, etc.

Prerequisites:

  • AWS Credits
  • Node.js
  • MongoDB database

First, we need to create a S3 Bucket and enable the public access. After that, create a folder called images.

Image description

Once it's created, add the following Bucket policy.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::<YOUR_BUCKET_NAME>/images/*"
        }
    ]
}

Then go to Security Credentials and create two users (in the same AWS Region) with the following permissions:

  • User 1 (AWS-Rekognition): AmazonRekognitionFullAccess and AmazonS3ReadOnlyAccess
  • User 2 (AWS-S3): AmazonS3FullAccess

Generate an access key and secret key for both and paste them in the .env file from the API project.

MONGO_URI=

AWS_S3_ACCESS_KEY=
AWS_S3_SECRET_ACCESS_KEY=
AWS_S3_REGION=
AWS_S3_BUCKET_NAME=
AWS_S3_BUCKET_FOLDER=

AWS_REKOGNITION_REGION=
AWS_REKOGNITION_ACCESS_KEY=
AWS_REKOGNITION_SECRET_ACCESS_KEY=

Create a MongoDB and add the connection string in the MONGO_URI key.
In the UI project you need to add base url for the API in REACT_APP_API_BASE_URL key.

Rekognition Integration:
Use the AWS SDK to call the Rekognition DetectModerationLabels API. This API analyzes the image and returns a list of detected labels, including confidence scores.
Define rules based on the detected labels and confidence scores to determine if an image is flagged as inappropriate. Check the constants/category-thesholds.contstant.ts file in API project to see the thresholds per category.

See this documentation to know more about the label categories.

This is an example for the response returned from AWS Rekognition:

{
    "ModerationLabels": [
        {
            "Confidence": 99.44782257080078,
            "Name": "Smoking",
            "ParentName": "Drugs & Tobacco Paraphernalia & Use",
            "TaxonomyLevel": 3
        },
        {
            "Confidence": 99.44782257080078,
            "Name": "Drugs & Tobacco Paraphernalia & Use",
            "ParentName": "Drugs & Tobacco",
            "TaxonomyLevel": 2
        },
        {
            "Confidence": 99.44782257080078,
            "Name": "Drugs & Tobacco",
            "ParentName": "",
            "TaxonomyLevel": 1
        }
    ],
    "ModerationModelVersion": "7.0",
    "ContentTypes": [
        {
            "Confidence": 99.9999008178711,
            "Name": "Illustrated"
        }
    ]
}

To test the demo, you submit some images.

Image description

If the image content is categorized as harmful (based on threshold categories) in any category, it will be blurred by default. But you can turn off the blur by clicking the button displayed in the center for each image.

Image description

Images are rejected if the rejection threshold is equal to or greater than the confidence score of a category.

Image description

Conclusion

A strong and effective picture moderation system can be created by utilizing the capabilities of AWS Rekognition, Nest.js, and React. By proactively identifying and eliminating dangerous information, this approach can assist online platforms in making the internet a safer and more enjoyable place for all users.
This is a basic example, and you can further enhance this system by adding features like:

  • Customizable moderation rules: Allow administrators to define and adjust moderation rules based on their specific needs.
  • Human review: Implement a human review process for images that are flagged by the system.

Thanks for reading

Thank you very much for reading. I hope you found this article interesting and may be useful in the future. If you have any questions or ideas you need to discuss, it will be a pleasure to collaborate and exchange knowledge.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Building an Image Moderation System with AWS Rekognition, Nest.js, and React

Thematisch verwandte Begriffe: Building, Image, Moderation, System · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-61591 | djust provides Phoenix LiveView-style reactive server-side rendering for…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
News ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

↗ Original-Quelle