並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 168件

新着順 人気順

boolean function in javascript exampleの検索結果1 - 40 件 / 168件

  • Node.jsのMySQLパッケージにおけるエスケープ処理だけでは防げない「隠れた」SQLインジェクション - GMO Flatt Security Blog

    ※本記事は筆者styprが英語で執筆した記事を株式会社Flatt Security社内で日本語に翻訳したものになります。 TL;DR Node.jsのエコシステムで最も人気のあるMySQLパッケージの一つである mysqljs/mysql (https://github.com/mysqljs/mysql)において、クエリのエスケープ関数の予期せぬ動作がSQLインジェクションを引き起こす可能性があることが判明しました。 通常、クエリのエスケープ関数やプレースホルダはSQLインジェクションを防ぐことが知られています。しかし、mysqljs/mysql は、値の種類によってエスケープ方法が異なることが知られており、攻撃者が異なる値の種類でパラメータを渡すと、最終的に予期せぬ動作を引き起こす可能性があります。予期せぬ動作とは、バグのような動作やSQLインジェクションなどです。 ほぼすべてのオンラ

      Node.jsのMySQLパッケージにおけるエスケープ処理だけでは防げない「隠れた」SQLインジェクション - GMO Flatt Security Blog
    • Passkey認証の実装ミスに起因する脆弱性・セキュリティリスク - GMO Flatt Security Blog

      はじめに こんにちは、GMO Flatt Security株式会社 セキュリティエンジニアの小武です。 近年、WebAuthn、特にPasskeyはパスワードレス認証への関心の高まりや利便性の高さから、普及が進んでいます。 WebAuthnによるPasskey認証は強固な認証手段ですが、複雑な認証基盤の実装に不備があると、依然としてアカウント乗っ取りを含む従来のセキュリティリスクを払拭できません。 本記事では、W3CのWorking Draft(2025年5月現在)である Web Authentication: An API for accessing Public Key Credentials Level 3 を読み解き、Relying Party(RP)としてPasskey認証を導入する際に実装で注意すべき点を説明いたします。 はじめに Passkey認証でも生まれ得るセキュリティリ

        Passkey認証の実装ミスに起因する脆弱性・セキュリティリスク - GMO Flatt Security Blog
      • How I built a modern website in 2021

        How I built a modern website in 2021September 29th, 2021 — 34 min read For over half of 2021, I worked on a complete rewrite of kentcdodds.com. You're reading this on the rewrite of this site! Are you using dark mode or light mode? Have you signed in and selected your team yet? Have you tried to call into the Call Kent Podcast? This blog post isn't about these and other features of the new site, b

          How I built a modern website in 2021
        • Amazon S3の脆弱な利用によるセキュリティリスクと対策 - GMO Flatt Security Blog

          はじめに こんにちは、株式会社Flatt Security セキュリティエンジニアの森岡(@scgajge12)です。 本稿では、Amazon S3 の脆弱な使い方によるセキュリティリスクと対策を解説し、実際の設定不備などに関する事例についても紹介します。 Flatt Security は専門家の視点でセキュリティリスクを調査するセキュリティ診断を提供しています。クラウドとアプリケーションの総合的な診断の事例として SmartHR 様の診断事例がございますので、是非インタビュー記事をご覧ください。GCP の事例ですが、もちろん今回取り上げる AWS でも同様の診断が可能です。 はじめに Amazon S3 とは バケット・オブジェクト バケット オブジェクト アクセスポリシー バケットポリシー アクセスコントロールリスト(ACL) IAM ポリシー 署名付き URL Amazon S3 に

            Amazon S3の脆弱な利用によるセキュリティリスクと対策 - GMO Flatt Security Blog
          • API シナリオテストツール Postman・Tavern・runn 徹底比較 – 私が runn を選んだ理由 - TechDoctor開発者Blog

            はじめに はじめまして、テックドクターでバックエンドエンジニアをしている筧と申します。 最近、弊社では API の品質を担保するために「API シナリオテスト」をプロダクトに導入しました。今回は、この API シナリオテストのツールである Postman(+Newman)、Tavern そして runn を比較し、最終的に runn を選んだ理由をご紹介します。 API シナリオテストとは? API シナリオテストとはなんでしょうか? 開発におけるテストといえば、ユニットテストや結合テスト、API テストや E2E テストなどをよく耳にします。しかしAPI シナリオテストという言葉はあまり聞き馴染みがないという方も多いかもしれません。 API シナリオテストは API テストの一種で、複数の API を連鎖的に呼び出して実行するテストです。以下の特徴を持っています。 複数の API を順序

              API シナリオテストツール Postman・Tavern・runn 徹底比較 – 私が runn を選んだ理由 - TechDoctor開発者Blog
            • インクリメンタルに新しい技術を取り入れる方法。TypeScriptへの移行を例にしたプロセス

              📝 require(moduleName) は同期処理なのに対して、import(moduleName)は非同期処理となります。 📝 tsconfig.jsonでesModuleInteropがtrueでないとdeafult importの意味合いは異なります。 この表はCommonJS ModulesとECMAScript Modulesで機能的に1対1で応するという意味ではありませんが、 大まかにはこの対応表にそってECMAScript Modulesの構文へと変換ができます。 エディターを使い手動で変換したり、次のようなツールを使ってある程度機械的な変換も可能です。 cjstoesm commonjs-to-es-module-codemod このモジュールの変換で重要なことは、できるだけCommonJS ModulesとECMAScript Modulesを混ぜないことです。

                インクリメンタルに新しい技術を取り入れる方法。TypeScriptへの移行を例にしたプロセス
              • ブラウザで動作する地理空間データ処理ライブラリとして DuckDB-wasm を使い、 SQL を TypeScript で管理する仕組みを作る - newmo 技術ブログ

                newmo では、地図データや地理情報を扱う場面が多くあります。 たとえば、タクシーやライドシェアでは、営業区域のような営業していいエリアといった地理的な定義があります。 また、乗り入れ禁止区域のようなタクシーが乗り入れてはいけないエリアといった定義も必要になります。 これらの地理に関する定義は GeoJSON のような地理情報を扱うデータ形式で管理されることが多いです。 しかし、GeoJSONなどの定義をテキストとして手書きするのは困難です。 そのため、地図上に区域を作図するエディタやその定義した区域が正しいかをチェックするような管理ツールが必要です。 管理ツールは、ウェブアプリケーションとして作った方が利用できる環境が広がります。 このような地理情報は一度に扱うデータが多かったり、空間的な計算処理が必要になるため、専用の仕組みを使うことが多いです。 このような技術を、地理情報システム(

                  ブラウザで動作する地理空間データ処理ライブラリとして DuckDB-wasm を使い、 SQL を TypeScript で管理する仕組みを作る - newmo 技術ブログ
                • MCP ツールのコンテキスト圧迫の問題とその解決策

                  MCP の普及に伴い、多数のツール定義が LLM のコンテキストを圧迫する課題が浮上しています。本記事では Progressive disclosure(段階的開示)による最小限の情報提供、MCP を使ったコード実行によるツール呼び出しの効率化、単一の検索ツールによるコンテキスト削減など、実践的な解決策を Claude Skills や Cloudflare Code Mode の事例とともに解説します。 Model Context Protocol (MCP) は登場からおよそ 1 年が経過し、事実的な標準としての地位を確立しつつあります。MCP が普及するにつれて、MCP ツールの課題点も浮き彫りになってきました。その課題の 1 つが、1 つのタスクを達成するために多くのツールが読み込まれ、結果として多くのコンテキストが消費されてしまうという問題です。 前提として、LLM がタスクの達

                    MCP ツールのコンテキスト圧迫の問題とその解決策
                  • Announcing TypeScript 5.0 - TypeScript

                    Today we’re excited to announce the release of TypeScript 5.0! This release brings many new features, while aiming to make TypeScript smaller, simpler, and faster. We’ve implemented the new decorators standard, added functionality to better support ESM projects in Node and bundlers, provided new ways for library authors to control generic inference, expanded our JSDoc functionality, simplified con

                      Announcing TypeScript 5.0 - TypeScript
                    • 【忙しい人のための】Next.js公式チュートリアルを完走してきたので記事1本で振り返る【ギュッと凝縮】 | DevelopersIO

                      本記事はNext.jsのチュートリアルが大きく変わったためリンク切れを起こしています。 技術メモのため記事としては残しますが、リンク切れにご留意ください。 また機会があれば新チュートリアルで記事を書こうと思いますm(_ _)m こんちには。 データアナリティクス事業本部 インテグレーション部 機械学習チームの中村です。 今回は以下のNext.jsのチュートリアルをほぼ一通り(SEOのところ以外)実施しましたので、ポイントを記事化しました。 https://nextjs.org/learn/foundations/about-nextjs" チュートリアル自体は、以下のような内容が分かるものとなっています。 CRA(create-react-app)のみ使用しているとイメージしづらい、素のHTML + JavaScriptとReactの関係のイメージが分かる Reactがフレームワークではな

                        【忙しい人のための】Next.js公式チュートリアルを完走してきたので記事1本で振り返る【ギュッと凝縮】 | DevelopersIO
                      • gpt-5 leaked system prompt

                        gistfile1.txt �t�˪� p�#̪� You are ChatGPT, a large language model based on the GPT-5 model and trained by OpenAI. Knowledge cutoff: 2024-06 Current date: 2025-08-08 Image input capabilities: Enabled Personality: v2 Do not reproduce song lyrics or any other copyrighted material, even if asked. You're an insightful, encouraging assistant who combines meticulous clarity with genuine enthusiasm and ge

                          gpt-5 leaked system prompt
                        • TypeScript をより安全に使うために その 2: オブジェクトの具体的な形にアクセスするのを避ける - Object.create(null)

                          前回はこちら. susisu.hatenablog.com 引き続き環境は以下を前提とします: TypeScript 4.4 (この記事を書いている 2021 年 11 月時点の最新版) strict: true 原則: オブジェクトの具体的な形にアクセスするのを避ける 具体例 in 演算子による型の絞り込み Object.keys の誤った使用 Object.values, Object.entries の使用 リテラルの先頭以外での object sperad 次回 原則: オブジェクトの具体的な形にアクセスするのを避ける ここで「オブジェクトの具体的な形にアクセスする」とは, 静的な型によらずに, 実行時にオブジェクトがどのようなプロパティを持っているかといった情報を取得することを指しています. ある種のリフレクションと呼んでも良いかもしれません. こういった操作には, JavaSc

                            TypeScript をより安全に使うために その 2: オブジェクトの具体的な形にアクセスするのを避ける - Object.create(null)
                          • Announcing TypeScript 6.0 - TypeScript

                            Today we are excited to announce the availability of TypeScript 6.0! If you are not familiar with TypeScript, it’s a language that builds on JavaScript by adding syntax for types, which enables type-checking to catch errors, and provide rich editor tooling. You can learn more about TypeScript and how to get started on the TypeScript website. But if you’re already familiar with the language, you ca

                              Announcing TypeScript 6.0 - TypeScript
                            • WebKit Features in Safari 16.4

                              Mar 27, 2023 by Patrick Angle, Marcos Caceres, Razvan Caliman, Jon Davis, Brady Eidson, Timothy Hatcher, Ryosuke Niwa, and Jen Simmons ContentsWeb Push on iOS and iPadOSImprovements for Web AppsWeb ComponentsCSSHTMLJavaScript and WebAssemblyWeb APIImages, Video, and AudioWKWebViewDeveloper ToolingWeb InspectorSafari Web ExtensionsSafari Content BlockersNew Restrictions in Lockdown ModeMore Improve

                                WebKit Features in Safari 16.4
                              • TypeScript Clearly & Quickly

                                2024-01-01 quick-lint-js is a JavaScript bug finder. Today, version 3.0 makes it also a TypeScript bug finder! quick-lint-js complements TypeScript with beginner-friendly messages and fast linting. install quick-lint-js 🌐 try in browser code on GitHub Example code used in this article has been adapted from various open source projects, including some Copyright Tiny Technologies, Inc. and Copyrigh

                                • Your URL Is Your State

                                  Couple of weeks ago when I was publishing The Hidden Cost of URL Design I needed to add SQL syntax highlighting. I headed to PrismJS website trying to remember if it should be added as a plugin or what. I was overwhelmed with the amount of options in the download page so I headed back to my code. I checked the file for PrismJS and at the top of the file, I found a comment containing a URL: /* http

                                  • Next.js 13 vs Remix: An In-depth case study — Prateek Surana

                                    When it comes to building web applications, React has been at the forefront for a while now, and its adoption continues to grow. Among the most common approaches to building web applications with React, Next.js stands out as one of the most preferred options. Next.js has also been in the limelight since last year when they released their biggest update to the framework ever with the app router. Th

                                      Next.js 13 vs Remix: An In-depth case study — Prateek Surana
                                    • PacketProxyで探るGemini CLIのコンテキストエンジニアリング 〜AIエージェントを信頼できる相棒に〜 | BLOG - DeNA Engineering

                                      2025.07.18 技術記事 PacketProxyで探るGemini CLIのコンテキストエンジニアリング 〜AIエージェントを信頼できる相棒に〜 by akira.kuroiwa #gemini-cli #ai #security #ai-agent #context-engineering #packetproxy 「なんかよく分からないけど、すごい」で終わらせないために こんにちは、DeNA セキュリティ技術グループの 黒岩 亮 ( @kakira9618 ) です。 AIエージェント、とくに Gemini CLI のようなコーディングを支援してくれるツールは非常に強力で、私たちの開発体験を大きく変えようとしています。しかし、その一方で、こんな風に感じたことはありませんか? 「このファイルの情報、勝手にAIに送られたりしない? 大丈夫かな?」 と、情報管理・セキュリティ面で漠然と

                                        PacketProxyで探るGemini CLIのコンテキストエンジニアリング 〜AIエージェントを信頼できる相棒に〜 | BLOG - DeNA Engineering
                                      • Announcing TypeScript 4.5 - TypeScript

                                        Today we’re excited to announce the release of TypeScript 4.5! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript by adding statically checked types. When you use static types, you can run the TypeScript compiler to check for bugs like typos and mismatches in the shapes of your data, and get handy suggestions. These types don’t change your program, and you can re

                                          Announcing TypeScript 4.5 - TypeScript
                                        • Announcing TypeScript 5.1 - TypeScript

                                          Today we’re excited to announce the release of TypeScript 5.1! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript by adding constructs called types. These types can describe some details about our program, and can be checked by TypeScript before they’re compiled away in order to catch possible typos, logic bugs and more. TypeScript also uses these types to provid

                                            Announcing TypeScript 5.1 - TypeScript
                                          • Prettier 3.0: Hello, ECMAScript Modules! · Prettier

                                            We are excited to announce the release of the new version of Prettier! We have made the migration to using ECMAScript Modules for all our source code. This change has significantly improved the development experience for the Prettier team. Please rest assured that when using Prettier as a library, you can still use it as CommonJS as well. This update comes with several breaking changes. One notabl

                                              Prettier 3.0: Hello, ECMAScript Modules! · Prettier
                                            • Reconstructing TypeScript, part 0: intro and background

                                              Jake Donham > Technical Difficulties > Reconstructing TypeScript, part 0 Reconstructing TypeScript, part 0: intro and background2021-09-07I've been building a "document development environment" called Programmable Matter that supports live code embedded in documents, with a simple TypeScript-like programming language. It's been fun figuring out how to implement it—the type system in TypeScript is

                                              • SWCとRelease Pleaseで始めるReact TypeScriptライブラリ開発と公開 - BASEプロダクトチームブログ

                                                こんにちは。Pay ID Devの大木 (@roothybrid7)です。 今回外部スクリプトとして読み込み利用する外部SDKを、Reactに組み込むためのラッパーライブラリを作ったので、その開発事例を紹介します。 今回、SWC(Speedy Web Compiler)やRelease Pleaseを利用して開発したので、主にそれらをどう使ったのかを紹介いたします。 背景 去年12/16に開催しましたオンラインイベント「BASE Tech Talk #1 〜Next.jsを使ったカート大規模リプレイスPJの裏側〜」の通り、BASEカートシステムのFrontendアプリケーションは、Next.jsで動作してます。 さて、アプリケーションでは、Amazon PayやPayPalなど様々な外部の決済サービスを利用しており、それらのJavaScript SDKをいくつか利用しています。 これらのS

                                                  SWCとRelease Pleaseで始めるReact TypeScriptライブラリ開発と公開 - BASEプロダクトチームブログ
                                                • Announcing TypeScript 4.7 - TypeScript

                                                  Today we’re excited to announce the availability of TypeScript 4.7! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you’re working with and what kinds of functions you’re calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting

                                                    Announcing TypeScript 4.7 - TypeScript
                                                  • JavaScript eventing deep dive  |  Articles  |  web.dev

                                                    Event.stopPropagation() and Event.preventDefault() JavaScript event handling is often straightforward. This is especially true when dealing with a simple (relatively flat) HTML structure. Things get a bit more involved though when events are traveling (or propagating) through a hierarchy of elements. This is typically when developers reach for stopPropagation() and/or preventDefault() to solve the

                                                    • Announcing TypeScript 4.7 Beta - TypeScript

                                                      Today we are excited to announce the beta release of TypeScript 4.7! To get started using the beta, you can use npm with the following command: npm install typescript@beta You can also get editor support by Downloading for Visual Studio 2022/2019 Following directions for Visual Studio Code and Sublime Text 3. Here’s a quick list of what’s new in TypeScript 4.7! ECMAScript Module Support in Node.js

                                                        Announcing TypeScript 4.7 Beta - TypeScript
                                                      • Prototyping in Rust | corrode Rust Consulting

                                                        Programming is an iterative process. As much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often begin as quick prototypes. While many experiments remain prototypes, the best programs can evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best

                                                          Prototyping in Rust | corrode Rust Consulting
                                                        • フロントエンドエンジニアのためのHaskell入門 | ダーシノ(@bc_rikko)

                                                          フロントエンドエンジニアのためのHaskell入門 JavaScriptのなんちゃって関数型プログラミングではなく、純粋な関数型プログラミングのエッセンスを学びたくてHaskellを選んだ。しかし、過去3回入門したが3回破門されたので、今度こそ免許皆伝したい。 普段はTypeScriptで開発を行っているので、Haskellと比較しながら学んでいきたい。 基本構文 変数の宣言 const x: number = 10 x :: Int x = 10 関数の宣言 function add(x: number, y: number): number { return x + y } add :: Int -> Int -> Int add x y = x + y アロー関数 const add = (x: number, y: number): number => x + y add :: I

                                                            フロントエンドエンジニアのためのHaskell入門 | ダーシノ(@bc_rikko)
                                                          • Announcing TypeScript 5.0 Beta - TypeScript

                                                            Today we’re excited to announce our beta release of TypeScript 5.0! This release brings many new features, while aiming to make TypeScript, smaller, simpler, and faster. We’ve implemented the new decorators standard, functionality to better support ESM projects in Node and bundlers, new ways for library authors to control generic inference, expanded our JSDoc functionality, simplified configuratio

                                                              Announcing TypeScript 5.0 Beta - TypeScript
                                                            • The Two Reacts — overreacted

                                                              Suppose I want to display something on your screen. Whether I want to display a web page like this blog post, an interactive web app, or even a native app that you might download from some app store, at least two devices must be involved. Your device and mine. It starts with some code and data on my device. For example, I am editing this blog post as a file on my laptop. If you see it on your scre

                                                                The Two Reacts — overreacted
                                                              • Announcing TypeScript 4.8 - TypeScript

                                                                Today we’re excited to announce the release of TypeScript 4.8! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. These types let you put your expectations and assumptions into your code, and those assumptions can then be checked by the TypeScript type-checker. This checking can help avoid typos, calling uninitialized values, mixing up

                                                                  Announcing TypeScript 4.8 - TypeScript
                                                                • Announcing connect() — a new API for creating TCP sockets from Cloudflare Workers

                                                                  Announcing connect() — a new API for creating TCP sockets from Cloudflare Workers2023-05-16 Today, we are excited to announce a new API in Cloudflare Workers for creating outbound TCP sockets, making it possible to connect directly to any TCP-based service from Workers. Standard protocols including SSH, MQTT, SMTP, FTP, and IRC are all built on top of TCP. Most importantly, nearly all applications

                                                                    Announcing connect() — a new API for creating TCP sockets from Cloudflare Workers
                                                                  • Announcing TypeScript 6.0 Beta - TypeScript

                                                                    Today we are announcing the beta release of TypeScript 6.0! To get started using the beta, you can get it through npm with the following command: npm install -D typescript@beta TypeScript 6.0 is a unique release in that we intend for it to be the last release based on the current JavaScript codebase. As announced last year (with recent updates here), we are working on a new codebase for the TypeSc

                                                                      Announcing TypeScript 6.0 Beta - TypeScript
                                                                    • Announcing TypeScript 4.9 - TypeScript

                                                                      Today we are excited to announce the availability of TypeScript 4.9! If you’re not familiar with TypeScript, it’s a language that builds on JavaScript by adding types and type-checking. Types can describe things like the shapes of our objects, how functions can be called, and whether a property can be null or undefined. TypeScript can check these types to make sure we’re not making mistakes in our

                                                                        Announcing TypeScript 4.9 - TypeScript
                                                                      • Announcing TypeScript 4.9 Beta - TypeScript

                                                                        Today we’re announcing our beta release of TypeScript 4.9! To get started using the beta, you can get it through NuGet, or- use npm with the following command: npm install -D typescript@beta You can also get editor support by Downloading for Visual Studio 2022/2019 Following directions for Visual Studio Code. Here’s a quick list of what’s new in TypeScript 4.9! The satisfies Operator Unlisted Prop

                                                                          Announcing TypeScript 4.9 Beta - TypeScript
                                                                        • Avoiding race conditions and memory leaks in React useEffect

                                                                          Let us take a look at an implementation of getting data from an API request and see if there is any possibility of race conditions happening in this component: import React, { useEffect} from 'react'; export default function UseEffectWithRaceCondition() { const [todo, setTodo] = useState(null); useEffect(() => { const fetchData = async () => { const response = await fetch('https://jsonplaceholder.

                                                                            Avoiding race conditions and memory leaks in React useEffect
                                                                          • Object Structure in JavaScript Engines

                                                                            Object Structure in JavaScript EnginesFrom a developer's perspective, objects in JavaScript are quite flexible and understandable. We can add, remove, and modify object properties on our own. However, few people think about how objects are stored in memory and processed by JS engines. Can a developer's actions, directly or indirectly, impact performance and memory consumption? Let's try to delve i

                                                                              Object Structure in JavaScript Engines
                                                                            • All JavaScript and TypeScript Features of the last 3 years

                                                                              TypeScript as envisioned by Stable DiffusionThis article goes through almost all of the changes of the last 3 years (and some from earlier) in JavaScript / ECMAScript and TypeScript . Not all of the following features will be relevant to you or even practical, but they should instead serve to show what’s possible and to deepen your understanding of these languages. There are a lot of TypeScript fe

                                                                                All JavaScript and TypeScript Features of the last 3 years
                                                                              • WebKit Features in Safari 17.4

                                                                                ContentsArchitectural improvementsWeb AppsForm elementsCSSWeb APIJavaScriptMediaSVGWebGLWeb AssemblyWeb InspectorChanges to SafariSafari ExtensionsWeb AuthenticationBug Fixes and moreUpdating to Safari 17.4Feedback Just like Safari 15.4 and Safari 16.4, this March’s release of Safari 17.4 is a significant one for web developers. We’re proud to announce another 46 features and 146 bug fixes. You ca

                                                                                  WebKit Features in Safari 17.4
                                                                                • CUPID: for joyful coding

                                                                                  What started as lighthearted iconoclasm, poking at the bear of SOLID, has developed into something more concrete and tangible. If I do not think the SOLID principles are useful these days, then what would I replace them with? Can any set of principles hold for all software? What do we even mean by principles? I believe that there are properties or characteristics of software that make it a joy to